Class: Arborist::Monitor::SNMP::CPU
- Inherits:
-
Object
- Object
- Arborist::Monitor::SNMP::CPU
- Extended by:
- Configurability, Loggability
- Includes:
- Arborist::Monitor::SNMP
- Defined in:
- lib/arborist/monitor/snmp/cpu.rb
Overview
Machine load/cpu checks.
Sets current 1, 5, and 15 minute loads under the ‘load’ attribute, and calculates/warns on cpu overutilization.
Constant Summary collapse
- OIDS =
OIDS for discovering system load.
{ load: '1.3.6.1.4.1.2021.10.1.3', cpu: '1.3.6.1.2.1.25.3.3.1.2' }
- LOADKEYS =
When walking load OIDS, the iterator count matches these labels.
i[ load1 load5 load15 ]
Class Method Summary collapse
-
.node_properties ⇒ Object
Return the properties used by this monitor.
-
.run(nodes) ⇒ Object
Class #run creates a new instance and immediately runs it.
Instance Method Summary collapse
-
#run(nodes) ⇒ Object
Perform the monitoring checks.
Class Method Details
.node_properties ⇒ Object
Return the properties used by this monitor.
40 41 42 |
# File 'lib/arborist/monitor/snmp/cpu.rb', line 40 def self::node_properties return USED_PROPERTIES end |
.run(nodes) ⇒ Object
Class #run creates a new instance and immediately runs it.
47 48 49 |
# File 'lib/arborist/monitor/snmp/cpu.rb', line 47 def self::run( nodes ) return new.run( nodes ) end |
Instance Method Details
#run(nodes) ⇒ Object
Perform the monitoring checks.
54 55 56 57 58 |
# File 'lib/arborist/monitor/snmp/cpu.rb', line 54 def run( nodes ) super do |host, snmp| self.find_load( host, snmp ) end end |