fluent-plugin-zabbix-agent 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/fluent/plugin/in_zabbix_agent.rb +10 -0
- 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: 45296588e6dc58726e0e86ac22535cbfa65f1f97
|
4
|
+
data.tar.gz: 2b554f37bd12d77653c3d920d1994e63e2e8b924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b10efadc433b726f7f2e44b2da1a8aebea1b2e32a1623e4fbd2c71aa07f1da23669c5d972d8f806ab4a2fa576dbc77fa15459274cd850e6c3ce8abc57f4b7084
|
7
|
+
data.tar.gz: 36812b8edb4c2617da803fca7f4a78822dc7dea17eee7339f46645247967fe0fc1b832f11fc39d49fd4e260543ab7ccbccf65de942ca89c6edacb2897b7e4e7e
|
data/README.md
CHANGED
@@ -22,6 +22,8 @@ class Fluent::ZabbixAgentInput < Fluent::Input
|
|
22
22
|
config_param :extra, :hash, :default => {}
|
23
23
|
config_param :bulk, :bool, :default => false
|
24
24
|
config_param :allow_items_empty, :bool, :default => false
|
25
|
+
config_param :include_hostname, :bool, :default => false
|
26
|
+
config_param :hostname_key, :string, :default => 'hostname'
|
25
27
|
|
26
28
|
def initialize
|
27
29
|
super
|
@@ -64,6 +66,10 @@ class Fluent::ZabbixAgentInput < Fluent::Input
|
|
64
66
|
value = @items[key]
|
65
67
|
@items[key] = key if value.nil?
|
66
68
|
end
|
69
|
+
|
70
|
+
if @include_hostname
|
71
|
+
@extra.update(@hostname_key => hostname)
|
72
|
+
end
|
67
73
|
end
|
68
74
|
|
69
75
|
def start
|
@@ -151,6 +157,10 @@ class Fluent::ZabbixAgentInput < Fluent::Input
|
|
151
157
|
end
|
152
158
|
end
|
153
159
|
|
160
|
+
def hostname
|
161
|
+
`hostname`.strip
|
162
|
+
end
|
163
|
+
|
154
164
|
class TimerWatcher < Coolio::TimerWatcher
|
155
165
|
def initialize(interval, repeat, log, &callback)
|
156
166
|
@callback = callback
|