Class: GRI::AppWalker
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#metrics ⇒ Object
readonly
Returns the value of attribute metrics.
-
#writers ⇒ Object
readonly
Returns the value of attribute writers.
Instance Method Summary collapse
-
#initialize(config) ⇒ AppWalker
constructor
A new instance of AppWalker.
- #run ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/gri/app_walker.rb', line 3 def config @config end |
#metrics ⇒ Object (readonly)
Returns the value of attribute metrics.
3 4 5 |
# File 'lib/gri/app_walker.rb', line 3 def metrics @metrics end |
#writers ⇒ Object (readonly)
Returns the value of attribute writers.
3 4 5 |
# File 'lib/gri/app_walker.rb', line 3 def writers @writers end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gri/app_walker.rb', line 11 def run if ARGV.size == 2 host, sym_oid = ARGV snmp = SNMP.new host snmp.version = @config['version'] || '1' snmp.community = @config['community'] || 'public' snmp.walk(sym_oid) {|oid, tag, val| p [oid, tag, val] } end end |