Class: Arborist::Monitor::SNMP::Memory

Inherits:
Object
  • Object
show all
Extended by:
Configurability, Loggability
Includes:
Arborist::Monitor::SNMP
Defined in:
lib/arborist/monitor/snmp/memory.rb

Overview

SNMP memory and swap utilization checks.

Set ‘usage’ and ‘available’ keys as properties, in percentage/GBs, respectively.

By default, doesn’t warn on memory usage, only swap, since that’s more indicitive of a problem. You can still set the ‘physical_warn_at’ key to force warnings on ram usage, for embedded systems or other similar things without virtual memory.

Constant Summary collapse

MEMORY =

OIDS for discovering memory usage.

{
	total:  '1.3.6.1.4.1.2021.4.5.0',
	avail: '1.3.6.1.4.1.2021.4.6.0',
	windows: {
		label: '1.3.6.1.2.1.25.2.3.1.3',
		units: '1.3.6.1.2.1.25.2.3.1.4',
		total: '1.3.6.1.2.1.25.2.3.1.5',
		used:  '1.3.6.1.2.1.25.2.3.1.6'
	}
}
SWAP =

OIDS for discovering swap usage.

{
	total: '1.3.6.1.4.1.2021.4.3.0',
	avail: '1.3.6.1.4.1.2021.4.4.0'
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.node_propertiesObject

Return the properties used by this monitor.



55
56
57
# File 'lib/arborist/monitor/snmp/memory.rb', line 55

def self::node_properties
	return USED_PROPERTIES
end

.run(nodes) ⇒ Object

Class #run creates a new instance and immediately runs it.



63
64
65
# File 'lib/arborist/monitor/snmp/memory.rb', line 63

def self::run( nodes )
	return new.run( nodes )
end

Instance Method Details

#run(nodes) ⇒ Object

Perform the monitoring checks.



70
71
72
73
74
# File 'lib/arborist/monitor/snmp/memory.rb', line 70

def run( nodes )
	super do |host, snmp|
		self.gather_memory( host, snmp )
	end
end