fluent-plugin-zabbix-agent 0.1.7 → 0.1.8

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
  SHA1:
3
- metadata.gz: 41de6d3645b7c27c8f0d1980ce6b4dace20da755
4
- data.tar.gz: e7dcee6a5d30a081c4f5f034bbf3796ccd6e2c15
3
+ metadata.gz: 19879ccffdafe5103cb7f1d499c6332353dc641e
4
+ data.tar.gz: d6f0dc1bc01887c460b840cae287e0528ba7d800
5
5
  SHA512:
6
- metadata.gz: 9f476ddafeee0cbc20e989b54440ffb74e2a4239e6c1b0998c002679067b69fab6caf26901e0715620262e387882cdf4f9cd769fa107a187fa8fd13a2a197bb4
7
- data.tar.gz: 4cf65cc77bcd4cd7976c5f5403b5cb28567e37e7a8c5c78d8b9bfe8c571e1113d4c6293d03a2f9f5ce305a951b58bbd03b3fbfbfe753d83711c71bbcbf489b5f
6
+ metadata.gz: ac5db10d219d2966ff9ece76c9cf8c231fa7a189a0427b8c20090762416f94f682c737f4c1b23ca6cbee8d4bfce307750aef3610850bc4382363b046c94f1020
7
+ data.tar.gz: 67fab2b11aa61d43da2337de22d85e8fb81027c0d58ddbf1ee970e05eb2c0cfbcf69e98eb3b6272a57549b9e4bbf1fa3612eda9ff80e98ddbe0afc307c6eff8b
data/README.md CHANGED
@@ -37,6 +37,7 @@ Or install it yourself as:
37
37
  #item_value_key value
38
38
  #extra {}
39
39
  #bulk false
40
+ #allow_items_empty false
40
41
 
41
42
  items {
42
43
  "system.cpu.load[all,avg1]": "load_avg1",
@@ -11,16 +11,17 @@ class Fluent::ZabbixAgentInput < Fluent::Input
11
11
  define_method('router') { Fluent::Engine }
12
12
  end
13
13
 
14
- config_param :agent_host, :string, :default => '127.0.0.1'
15
- config_param :agent_port, :integer, :default => 10050
16
- config_param :interval, :time, :default => 60
17
- config_param :tag, :string, :default => 'zabbix.item'
18
- config_param :item_key_key, :string, :default => 'key'
19
- config_param :item_value_key, :string, :default => 'value'
20
- config_param :items, :hash, :default => nil
21
- config_param :items_file, :string, :default => nil
22
- config_param :extra, :hash, :default => {}
23
- config_param :bulk, :bool, :default => false
14
+ config_param :agent_host, :string, :default => '127.0.0.1'
15
+ config_param :agent_port, :integer, :default => 10050
16
+ config_param :interval, :time, :default => 60
17
+ config_param :tag, :string, :default => 'zabbix.item'
18
+ config_param :item_key_key, :string, :default => 'key'
19
+ config_param :item_value_key, :string, :default => 'value'
20
+ config_param :items, :hash, :default => nil
21
+ config_param :items_file, :string, :default => nil
22
+ config_param :extra, :hash, :default => {}
23
+ config_param :bulk, :bool, :default => false
24
+ config_param :allow_items_empty, :bool, :default => false
24
25
 
25
26
  def initialize
26
27
  super
@@ -57,7 +58,7 @@ class Fluent::ZabbixAgentInput < Fluent::Input
57
58
  end
58
59
  end
59
60
 
60
- if @items.empty?
61
+ if @items.empty? and not @allow_items_empty
61
62
  raise Fluent::ConfigError, '"items" or "items_file" is empty'
62
63
  end
63
64
 
@@ -111,7 +112,9 @@ class Fluent::ZabbixAgentInput < Fluent::Input
111
112
  end
112
113
  end
113
114
 
114
- emit_items(value_by_item)
115
+ unless value_by_item.empty?
116
+ emit_items(value_by_item)
117
+ end
115
118
  end
116
119
 
117
120
  def zabbix_get(key)
@@ -1,3 +1,3 @@
1
1
  module FluentPluginZabbixAgent
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-zabbix-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara