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 +4 -4
- data/README.md +1 -0
- data/lib/fluent/plugin/in_zabbix_agent.rb +15 -12
- data/lib/fluent_plugin_zabbix_agent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 19879ccffdafe5103cb7f1d499c6332353dc641e
|
|
4
|
+
data.tar.gz: d6f0dc1bc01887c460b840cae287e0528ba7d800
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac5db10d219d2966ff9ece76c9cf8c231fa7a189a0427b8c20090762416f94f682c737f4c1b23ca6cbee8d4bfce307750aef3610850bc4382363b046c94f1020
|
|
7
|
+
data.tar.gz: 67fab2b11aa61d43da2337de22d85e8fb81027c0d58ddbf1ee970e05eb2c0cfbcf69e98eb3b6272a57549b9e4bbf1fa3612eda9ff80e98ddbe0afc307c6eff8b
|
data/README.md
CHANGED
|
@@ -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,
|
|
15
|
-
config_param :agent_port,
|
|
16
|
-
config_param :interval,
|
|
17
|
-
config_param :tag,
|
|
18
|
-
config_param :item_key_key,
|
|
19
|
-
config_param :item_value_key,
|
|
20
|
-
config_param :items,
|
|
21
|
-
config_param :items_file,
|
|
22
|
-
config_param :extra,
|
|
23
|
-
config_param :bulk,
|
|
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
|
-
|
|
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)
|