Class: Monitors::ResponseTime
- Defined in:
- lib/monitors/response_time.rb
Class Method Summary collapse
Methods inherited from Base
Methods included from Logging
Class Method Details
.check_interval ⇒ Object
21 22 23 |
# File 'lib/monitors/response_time.rb', line 21 def check_interval Cfg.response_time_check_interval end |
.perform_check ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/monitors/response_time.rb', line 8 def perform_check all_processes_ok = true running_instances.each do |p| if ViolationsRecorders::ResponseTime.is_violating?(p) all_processes_ok = false log "process #{p} had a response time violation" Phantom::Manager.restart(p) end end log "All response time are ok" if all_processes_ok end |