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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e9e82ae6acd85c0a2bd78d03fdf9cc6b370f3b0
4
- data.tar.gz: e68f51a774ec59b03a533d0563454a2c7fe9806d
3
+ metadata.gz: 90b064b3363a061c4ddb2c5ea48ccc6ca6109cc7
4
+ data.tar.gz: 73ec863548405ec6471329f375b362e0f384889a
5
5
  SHA512:
6
- metadata.gz: 47709b31852db97f53584c4722b7b64c226fd972de41f25d6e77893fc430a14cbff2d249c14819505e47f415911c5931bb75636177e3f52abaac7e5051d09593
7
- data.tar.gz: e87acc4edf7640e60012f8044dd9f00af15efe6ef6e81ce28708b8ac6b6930458733484175df661d494850bbc0496b176fb072e12b825d01d5c06a57272b081c
6
+ metadata.gz: 1d1da1ac043177d538f053216c2e334c0654d839f13c47b3077599b2439e90ab059f1059db8b423772a9d6dada4b8510cc9219022617a22a67241c824ccb623f
7
+ data.tar.gz: bfdaf09ae1e7acf7b6dab73732644eb3972cbbc4ce996750a3b03adea33e892508688b1446c8e365357c4278b8422aea72954af2ad6f6d4f7a8710e4d674e68a
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  test.rb
11
+ fluent.conf
@@ -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
- value = zabbix_get(key)
81
- value_by_item[record_key] = value
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)
@@ -1,3 +1,3 @@
1
1
  module FluentPluginZabbixAgent
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
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.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-12 00:00:00.000000000 Z
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: '0'
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: '0'
40
+ version: 0.1.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement