fluent-plugin-zabbix-agent 0.1.2 → 0.1.3
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 +2 -0
- data/lib/fluent/plugin/in_zabbix_agent.rb +12 -3
- 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: 70ea3efb9f6850bc5baaf5edfd4ba7ceaa5f2727
|
4
|
+
data.tar.gz: 42e89b3a717f56601aad4ba89ef46f6485ab2abf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cc4ddd43188a5c2d8172e3a13c611a956b7c9f3553ceeb48c406e379e4c7cf91e16cb78667bcbaf072b9774621c8d240c9a368aca9c05bbd865feabbf4d1edd
|
7
|
+
data.tar.gz: d92ac6db472f9f14b2d391e1e863725349ce9a52186446bbcb5759af98578973f41b6b59f952141a7d61c092a7d18788bc4a05e5d4ba1a43a8976fe5c7338b57
|
data/README.md
CHANGED
@@ -33,12 +33,21 @@ class Fluent::ZabbixAgentInput < Fluent::Input
|
|
33
33
|
if @items.nil? and @items_file.nil?
|
34
34
|
raise Fluent::ConfigError, 'One of "items" or "items_file" is required'
|
35
35
|
elsif @items and @items_file
|
36
|
-
raise %!It isn't possible to specify both of items" and "items_file"!
|
36
|
+
raise Fluent::ConfigError, %!It isn't possible to specify both of items" and "items_file"!
|
37
37
|
end
|
38
38
|
|
39
39
|
if @items_file
|
40
|
-
@items =
|
41
|
-
|
40
|
+
@items = {}
|
41
|
+
|
42
|
+
Dir.glob(@items_file) do |path|
|
43
|
+
file = File.read(path)
|
44
|
+
json = JSON.load(file)
|
45
|
+
@items.update(json) if json
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
if @items.empty?
|
50
|
+
raise Fluent::ConfigError, '"items" or "items_file" is empty'
|
42
51
|
end
|
43
52
|
|
44
53
|
@items.keys.each do |key|
|