fluent-plugin-zabbix-agent 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/fluent-plugin-zabbix-agent.gemspec +1 -1
- data/lib/fluent/plugin/in_zabbix_agent.rb +12 -2
- data/lib/fluent_plugin_zabbix_agent/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90b064b3363a061c4ddb2c5ea48ccc6ca6109cc7
|
4
|
+
data.tar.gz: 73ec863548405ec6471329f375b362e0f384889a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d1da1ac043177d538f053216c2e334c0654d839f13c47b3077599b2439e90ab059f1059db8b423772a9d6dada4b8510cc9219022617a22a67241c824ccb623f
|
7
|
+
data.tar.gz: bfdaf09ae1e7acf7b6dab73732644eb3972cbbc4ce996750a3b03adea33e892508688b1446c8e365357c4278b8422aea72954af2ad6f6d4f7a8710e4d674e68a
|
data/.gitignore
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
22
|
spec.add_dependency 'fluentd'
|
23
|
-
spec.add_dependency 'zabbix_protocol'
|
23
|
+
spec.add_dependency 'zabbix_protocol', '>= 0.1.4'
|
24
24
|
spec.add_development_dependency 'bundler'
|
25
25
|
spec.add_development_dependency 'rake'
|
26
26
|
spec.add_development_dependency 'rspec', '>= 3.0.0'
|
@@ -77,8 +77,18 @@ class Fluent::ZabbixAgentInput < Fluent::Input
|
|
77
77
|
value_by_item = {}
|
78
78
|
|
79
79
|
@items.each do |key, record_key|
|
80
|
-
|
81
|
-
|
80
|
+
begin
|
81
|
+
value = zabbix_get(key)
|
82
|
+
|
83
|
+
if value =~ /\AZBX_(NOTSUPPORTED|ERROR)\x00/
|
84
|
+
log.warn("#{key}: #{value}")
|
85
|
+
else
|
86
|
+
value_by_item[record_key] = value
|
87
|
+
end
|
88
|
+
rescue => e
|
89
|
+
log.warn("#{key}: #{e.message}")
|
90
|
+
log.warn_backtrace(e.backtrace)
|
91
|
+
end
|
82
92
|
end
|
83
93
|
|
84
94
|
emit_items(value_by_item)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-zabbix-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.1.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.1.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|