Class: AirPiCheck

Inherits:
GaddyGaddyCheck show all
Defined in:
lib/gg_check/plugins/AirPi.rb

Instance Method Summary collapse

Methods inherited from GaddyGaddyCheck

#extra, #initialize, #process_alive?, #run_cmd, #socket

Constructor Details

This class inherits a constructor from GaddyGaddyCheck

Instance Method Details

#status(options) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/gg_check/plugins/AirPi.rb', line 15

def status(options)
  check_result = {}
  if process_alive?("/opt/shairport/bin/shairport")
    check_result['status'] = 0
  else
    check_result['message_key'] = 'event.not_running'
    check_result['status'] = 2
    check_result['handlers'] = ['restart_service']
    check_result['process_name'] = 'shairport'
  end
  check_result
end