fluent-plugin-cmetrics 0.1.0.rc2 → 0.1.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa5328239515010bccb7710e1600b97fbfadf5674140056c4fda9434b65302e5
4
- data.tar.gz: 2d0dd9208b1a9babc353fefa5cf2ffc4ae67b24b7aa18f63e402a76287198059
3
+ metadata.gz: c618e0924f2b3abe13bb52238e97e86bc4fbbdc15ca67abd257228cd7c051538
4
+ data.tar.gz: c78308c6d609b74695e35dbe315baffaca9f129e7de1e83102d16f4a1a27f5e2
5
5
  SHA512:
6
- metadata.gz: 6eafe5b8ab643ab1b0f7e55d06fe7d5385321bf8689e8ed5d953f7fde04953b33acdff7a691d19be120a236253ae170a75ebef878025e291d83dfd3ce6a01d70
7
- data.tar.gz: 5141e4794e95a066b951da679fb44f09fc61bc415ed6d960b16cb23eb2dbf2fa10692ce9aa29e2195e1ca55e63c5c9885e74aaf80d37e817594d742c6d87749b
6
+ metadata.gz: e564d3e9d388eb9668df6c47d6420d5402f42617d7b104d3aa7ca6de2c92d74fba549809fd6d3908eaa782a3dc40b7c6934a920d8170f6e03327a66c94c7408b
7
+ data.tar.gz: ecf3f9708f339b80b28622be0da128d23d255868f1ce4fb98abaaf7ffa643caa366b8723013390ec8fa2f28c2a22a3d333ba2149ffe9af317df89e3a1d38062a
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-cmetrics"
6
- spec.version = "0.1.0.rc2"
6
+ spec.version = "0.1.0.rc3"
7
7
  spec.authors = ["Hiroshi Hatake"]
8
8
  spec.email = ["cosmo0920.oucc@gmail.com"]
9
9
 
@@ -45,14 +45,14 @@ module Fluent
45
45
  labels_str = if labels = @labels_accessor.call(inner)
46
46
  labels_str = labels.map {|k,v|
47
47
  if k == "cpu"
48
- "id_#{v}"
48
+ "id.#{v}"
49
49
  else
50
- "#{k}_#{v}"
50
+ "#{k}.#{v}"
51
51
  end
52
- }.join("_")
52
+ }.join(".")
53
53
  end
54
54
  name = inner.delete("name")
55
- [subsystem, labels_str, name].compact.reject{|e| e.empty?}.join("_")
55
+ [subsystem, labels_str, name].compact.reject{|e| e.empty?}.join(".")
56
56
  end
57
57
 
58
58
  def filter_stream(tag, es)
@@ -6,10 +6,10 @@ class CmetricsParserTest < Test::Unit::TestCase
6
6
  Fluent::Test.setup
7
7
  end
8
8
 
9
- data("cpu" => ['{"namespace":"node","subsystem":"cpu","labels":{"cpu":"10","mode":"system"},"name":"seconds_total","description":"Seconds the CPUs spent in each mode.","value":13153.09}', "cpu_id_10_mode_system_seconds_total"],
10
- "filefd" => ['{"namespace":"node","subsystem":"filefd","name":"maximum","description":"File descriptor statistics: maximum.","value":9.223372036854776e+18}', "filefd_maximum"],
11
- "disk" => ['{"namespace":"node","subsystem":"disk","labels":{"device":"nvme0n1"},"name":"io_now","description":"The number of I/Os currently in progress.","value":0.0}', "disk_device_nvme0n1_io_now"],
12
- "network" => ['{"namespace":"node","subsystem":"network","labels":{"device":"eth0"},"name":"transmit_bytes_total","description":"Network device statistic bytes.","value":997193.0}', "network_device_eth0_transmit_bytes_total"],
9
+ data("cpu" => ['{"namespace":"node","subsystem":"cpu","labels":{"cpu":"10","mode":"system"},"name":"seconds_total","description":"Seconds the CPUs spent in each mode.","value":13153.09}', "cpu.id.10.mode.system.seconds_total"],
10
+ "filefd" => ['{"namespace":"node","subsystem":"filefd","name":"maximum","description":"File descriptor statistics: maximum.","value":9.223372036854776e+18}', "filefd.maximum"],
11
+ "disk" => ['{"namespace":"node","subsystem":"disk","labels":{"device":"nvme0n1"},"name":"io_now","description":"The number of I/Os currently in progress.","value":0.0}', "disk.device.nvme0n1.io_now"],
12
+ "network" => ['{"namespace":"node","subsystem":"network","labels":{"device":"eth0"},"name":"transmit_bytes_total","description":"Network device statistic bytes.","value":997193.0}', "network.device.eth0.transmit_bytes_total"],
13
13
  "none" => ['{"namespace":"node","subsystem":"","name":"load5","description":"5m load average.","value":0.94}', "load5"])
14
14
  test "#format_record_key_to_splunk_style" do |(json_str, expected_format_key)|
15
15
  json = Yajl.load(json_str)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-cmetrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc2
4
+ version: 0.1.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Hatake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-08 00:00:00.000000000 Z
11
+ date: 2021-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler