fluent-plugin-snmp 0.0.4 → 0.0.5
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.
- data/README.md +1 -1
- data/fluent-plugin-snmp.gemspec +1 -1
- data/lib/fluent/plugin/in_snmp.rb +3 -5
- metadata +2 -2
data/README.md
CHANGED
|
@@ -44,7 +44,7 @@ Or install it yourself as:
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
2012-11-08 16:07:40 +0900 snmp.server1: {"name":"HOST-RESOURCES-MIB::hrStorageUsed.31","value":"2352425"}
|
|
47
|
-
2012-11-08 16:07:
|
|
47
|
+
2012-11-08 16:07:45 +0900 snmp.server2: {"value":"[name=HOST-RESOURCES-MIB::hrStorageIndex.7, value=7 (INTEGER)]"}
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
## Copyright
|
data/fluent-plugin-snmp.gemspec
CHANGED
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |gem|
|
|
5
5
|
gem.name = "fluent-plugin-snmp"
|
|
6
|
-
gem.version = "0.0.
|
|
6
|
+
gem.version = "0.0.5"
|
|
7
7
|
gem.authors = ["hiro-su"]
|
|
8
8
|
gem.email = ["h-sugimoto@iij.ad.jp"]
|
|
9
9
|
gem.description = %q{Input plugin to walk snmp}
|
|
@@ -45,10 +45,6 @@ module Fluent
|
|
|
45
45
|
config_param :mib_modules, :string, :default => nil
|
|
46
46
|
config_param :use_IPv6, :string, :default => nil
|
|
47
47
|
|
|
48
|
-
def initialize
|
|
49
|
-
super
|
|
50
|
-
end
|
|
51
|
-
|
|
52
48
|
def configure(conf)
|
|
53
49
|
super
|
|
54
50
|
|
|
@@ -130,7 +126,7 @@ module Fluent
|
|
|
130
126
|
|
|
131
127
|
private
|
|
132
128
|
|
|
133
|
-
def snmpwalk(manager, mib, nodes
|
|
129
|
+
def snmpwalk(manager, mib, nodes, test=false)
|
|
134
130
|
manager.walk(mib) do |row|
|
|
135
131
|
time = Engine.now
|
|
136
132
|
time = time - time % 5
|
|
@@ -145,6 +141,8 @@ module Fluent
|
|
|
145
141
|
return {:time => time, :record => record} if test
|
|
146
142
|
end
|
|
147
143
|
end
|
|
144
|
+
rescue => ex
|
|
145
|
+
$log.error "snmpwalk failed", :error=>ex.message
|
|
148
146
|
end
|
|
149
147
|
|
|
150
148
|
# SNMPで取得したデータの型チェック
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-snmp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-11-
|
|
12
|
+
date: 2012-11-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: fluentd
|