lib/arborist/monitor/snmp/process.rb
changeset 16 d6773db8469c
parent 14 d5cb8bd33170
child 26 54f2f57cc0b0
equal deleted inserted replaced
15:d4776d62b193 16:d6773db8469c
    78 		self.log.debug "Running processes for host: %s: %p" % [ host, procs ]
    78 		self.log.debug "Running processes for host: %s: %p" % [ host, procs ]
    79 		self.results[ host ] = { count: procs.size }
    79 		self.results[ host ] = { count: procs.size }
    80 
    80 
    81 		# Check against what is running.
    81 		# Check against what is running.
    82 		#
    82 		#
    83 		Array( config['processes'] || self.class.check ).each do |process|
    83 		Array( config['check'] || self.class.check ).each do |process|
    84 			process_r = Regexp.new( process )
    84 			process_r = Regexp.new( process )
    85 			found = procs.find{|p| p.match(process_r) }
    85 			found = procs.find{|p| p.match(process_r) }
    86 			errors << "'%s' is not running" % [ process ] unless found
    86 			errors << "'%s' is not running" % [ process ] unless found
    87 		end
    87 		end
    88 
    88