Class: Copian::Collector::PortStatsCollector
- Inherits:
-
AbstractCollector
- Object
- AbstractCollector
- Copian::Collector::PortStatsCollector
- Defined in:
- lib/copian/collector/port_stats_collector.rb
Overview
:nodoc:
Instance Method Summary collapse
- #collect ⇒ Object
-
#initialize(manager) ⇒ PortStatsCollector
constructor
A new instance of PortStatsCollector.
Constructor Details
#initialize(manager) ⇒ PortStatsCollector
Returns a new instance of PortStatsCollector.
4 5 6 7 |
# File 'lib/copian/collector/port_stats_collector.rb', line 4 def initialize(manager) super(manager) @interfaces = Hash.new end |
Instance Method Details
#collect ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/copian/collector/port_stats_collector.rb', line 8 def collect load_mtu load_speed load_oper_status load_admin_status @interfaces.each do |ifindex, p| yield ifindex, p[:mtu], p[:speed], p[:admin_status], p[:oper_status] end end |