Class: Copian::Collector::DescriptionCollector

Inherits:
AbstractCollector show all
Defined in:
lib/copian/collector/description_collector.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from AbstractCollector

#initialize

Constructor Details

This class inherits a constructor from Copian::Collector::AbstractCollector

Instance Method Details

#collectObject



4
5
6
7
8
9
10
11
# File 'lib/copian/collector/description_collector.rb', line 4

def collect
  oid = SNMP::ObjectId.new('1.3.6.1.2.1.2.2.1.2')
  @manager.walk(oid) do |r|
    r.each do |varbind|
      yield varbind.name.index(oid), varbind.value.to_s
    end
  end
end