Class: Arborist::Monitor::SNMP::Disk
- Inherits:
-
Object
- Object
- Arborist::Monitor::SNMP::Disk
- Extended by:
- Configurability, Loggability
- Includes:
- Arborist::Monitor::SNMP
- Defined in:
- lib/arborist/monitor/snmp/disk.rb
Overview
Disk capacity checks.
Sets all configured mounts with their current usage percentage in an attribute named “mounts”.
Constant Summary collapse
- STORAGE_NET_SNMP =
OIDS required to pull disk information from net-snmp.
{ path: '1.3.6.1.4.1.2021.9.1.2', percent: '1.3.6.1.4.1.2021.9.1.9', type: '1.3.6.1.2.1.25.3.8.1.4' }
- WINDOWS_DEVICES =
The OID that matches a local windows hard disk.
[ '1.3.6.1.2.1.25.2.1.4', # local disk '1.3.6.1.2.1.25.2.1.7' # removables, but we have to include them for iscsi mounts ]
- STORAGE_WINDOWS =
OIDS required to pull disk information from Windows.
{ type: '1.3.6.1.2.1.25.2.3.1.2', path: '1.3.6.1.2.1.25.2.3.1.3', total: '1.3.6.1.2.1.25.2.3.1.5', used: '1.3.6.1.2.1.25.2.3.1.6' }
- WARN_AT =
The fallback warning capacity.
90
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.
72 73 74 75 76 |
# File 'lib/arborist/monitor/snmp/disk.rb', line 72 def self::node_properties used_properties = USED_PROPERTIES.dup used_properties << :mounts return used_properties end |
.run(nodes) ⇒ Object
Class #run creates a new instance and immediately runs it.
81 82 83 |
# File 'lib/arborist/monitor/snmp/disk.rb', line 81 def self::run( nodes ) return new.run( nodes ) end |
Instance Method Details
#run(nodes) ⇒ Object
Perform the monitoring checks.
88 89 90 91 92 |
# File 'lib/arborist/monitor/snmp/disk.rb', line 88 def run( nodes ) super do |host, snmp| self.gather_disks( host, snmp ) end end |