fluent-plugin-calyptia-monitoring 0.1.0.rc2 → 0.1.0.rc3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e354b4af025ab4d6212f2cc59fd2c356e97d7900fc873cf56798107ce9545dbb
4
- data.tar.gz: 4ebb6949a092949b0c2cd8e21d2636a56c2e969f209a89555bddb3467c2a528e
3
+ metadata.gz: 9ce44716243a51ce3400cdb88a452b7fec82e12642ea0f1e9cdc175e6d8768d0
4
+ data.tar.gz: 8f4e3cdce49b511820d265d175519f3a65517c38a7b409dec90745bd425741da
5
5
  SHA512:
6
- metadata.gz: 897bef9550f355493d137d799d21f1c202a60d026299117b931bb6dadee00a219faaa08fe1f2a47f6180afe5037fece2948f4fa37766b7efa1288f1fb0f2bdc9
7
- data.tar.gz: 5b21d181a087e333acb4468fed8c3d7ee7e5843a9e1e635c499bec31c8e46c27d3f4b1c87ab6a41fa2c6c43f4d849373f7dd565afb3e14568c99a0fcac879030
6
+ metadata.gz: '008865155bdee8e274d53f504ec08f2f5e52e91f7de806f4600632066e2995918dd9f01b63e9b18f785e865f662ebf203c9715e1cd3c55eded5e8870855f95ff'
7
+ data.tar.gz: 88d3b9026053c6cf8feec03f186c870a01dbe898a159fd3d9f06fb6643d4194344fd18a2cf85e52712844a79c3f34fb1e0671d61842433a1ff0a34f0543137f3
data/README.md CHANGED
@@ -49,7 +49,7 @@ $ bundle
49
49
 
50
50
  This plugin works well with [cmetrics Fluentd extension for metrics plugin](https://github.com/calyptia/fluent-plugin-metrics-cmetrics).
51
51
 
52
- And enabling RPC and configDump endpoint is requireed if sending Fluentd configuration:
52
+ And enabling RPC and configDump endpoint is required if sending Fluentd configuration:
53
53
 
54
54
  ```aconf
55
55
  <system>
@@ -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-calyptia-monitoring"
6
- spec.version = "0.1.0.rc2"
6
+ spec.version = "0.1.0.rc3"
7
7
  spec.authors = ["Hiroshi Hatake"]
8
8
  spec.email = ["hatake@calyptia.com"]
9
9
 
@@ -19,9 +19,11 @@ module Fluent::Plugin
19
19
  class CalyptiaMonitoringExtInput < MonitorAgentInput
20
20
  CALYPTIA_PLUGIN_METRIC_INFO = {
21
21
  'emit_size' => ->(){
22
+ throw(:skip) if @emit_size_metrics.get(self.plugin_id).nil?
22
23
  @emit_size_metrics.cmetrics.to_msgpack
23
24
  },
24
25
  'emit_records' => ->(){
26
+ throw(:skip) if @emit_records_metrics.get(self.plugin_id).nil?
25
27
  @emit_records_metrics.cmetrics.to_msgpack
26
28
  },
27
29
  'retry_count' => ->(){
@@ -53,7 +53,7 @@ module Fluent::Plugin
53
53
  require 'open3'
54
54
  o,_e, s = Open3.capture3 %q(ioreg -d2 -c IOPlatformExpertDevice | awk -F\" '/IOPlatformUUID/{print $(NF-1)}')
55
55
  unless s.success?
56
- @log.warn "MachineID is not retrived from ioreg. Using UUID instead."
56
+ @log.info "MachineID is not retrived from ioreg. Using UUID instead."
57
57
  "#{SecureRandom.uuid}:#{@worker_id}"
58
58
  else
59
59
  # TODO: The prefix should be removed?
@@ -69,7 +69,7 @@ module Fluent::Plugin
69
69
  machine_id = File.read(ETC_MACHINE_ID_PATH).strip rescue ""
70
70
  end
71
71
  if machine_id.empty?
72
- @log.warn "MachineID is not retrived from #{DBUS_MACHINE_ID_PATH} or #{ETC_MACHINE_ID_PATH}. Using UUID instead."
72
+ @log.info "MachineID is not retrived from #{DBUS_MACHINE_ID_PATH} or #{ETC_MACHINE_ID_PATH}. Using UUID instead."
73
73
  "#{SecureRandom.uuid}:#{@worker_id}"
74
74
  else
75
75
  # TODO: The prefix should be removed?
@@ -85,7 +85,7 @@ module Fluent::Plugin
85
85
  machine_id = key.read("MachineGuid")[1] rescue ""
86
86
  end
87
87
  if machine_id.empty?
88
- @log.warn "MachineID is not retrived from Registry. Using UUID instead."
88
+ @log.info "MachineID is not retrived from Registry. Using UUID instead."
89
89
  "#{SecureRandom.uuid}:#{@worker_id}"
90
90
  else
91
91
  # TODO: The prefix should be removed?
@@ -222,8 +222,12 @@ module Fluent
222
222
  buffer += v
223
223
  end
224
224
  }
225
- unless add_metrics(buffer)
226
- log.warn "Sending metrics is failed. Trying to send pending buffers in the next interval: #{@cloud_monitoring.rate}, next sending time: #{Time.now + @cloud_monitoring.rate}"
225
+ if buffer.empty?
226
+ log.debug "No initialized metrics is found. Trying to send cmetrics on the next tick."
227
+ else
228
+ unless add_metrics(buffer)
229
+ log.warn "Sending metrics is failed. Trying to send pending buffers in the next interval: #{@cloud_monitoring.rate}, next sending time: #{Time.now + @cloud_monitoring.rate}"
230
+ end
227
231
  end
228
232
  end
229
233
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-calyptia-monitoring
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-07-21 00:00:00.000000000 Z
11
+ date: 2021-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler