lib/arborist/monitor/snmp/memory.rb
changeset 26 54f2f57cc0b0
parent 14 d5cb8bd33170
equal deleted inserted replaced
25:6217282f6070 26:54f2f57cc0b0
    82 	### (and open) +snmp+ connection.
    82 	### (and open) +snmp+ connection.
    83 	###
    83 	###
    84 	def gather_memory( host, snmp )
    84 	def gather_memory( host, snmp )
    85 		info = self.system =~ /windows\s+/i ? self.get_windows( snmp ) : self.get_mem( snmp )
    85 		info = self.system =~ /windows\s+/i ? self.get_windows( snmp ) : self.get_mem( snmp )
    86 
    86 
    87 		config           = identifiers[ host ].last || {}
    87 		config           = self.identifiers[ host ].last['config'] || {}
    88 		physical_warn_at = config[ 'physical_warn_at' ] || self.class.physical_warn_at
    88 		physical_warn_at = config[ 'physical_warn_at' ] || self.class.physical_warn_at
    89 		swap_warn_at     = config[ 'swap_warn_at' ] || self.class.swap_warn_at
    89 		swap_warn_at     = config[ 'swap_warn_at' ] || self.class.swap_warn_at
    90 
    90 
    91 		self.log.debug "Memory data on %s: %p" % [ host, info ]
    91 		self.log.debug "Memory data on %s: %p" % [ host, info ]
    92 		memory, swap = info[:memory], info[:swap]
    92 		memory, swap = info[:memory], info[:swap]