Class: Monitors::Processes
Class Method Summary collapse
Methods inherited from Base
Methods included from Logging
Class Method Details
.check_interval ⇒ Object
25 26 27 |
# File 'lib/monitors/processes.rb', line 25 def check_interval Cfg.processes_check_interval end |
.perform_check ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/monitors/processes.rb', line 8 def perform_check missing_processes = Phantom::Collector.missing_ports.map do |port| p = Phantom::Process.new p.port = port p end missing_processes.each do |p| if ViolationsRecorders::Processes.is_violating?(p) log "found missing phantom on port #{p.port}" Phantom::Manager.start(p) end end log "All processes are running OK" if missing_processes.empty? end |