Class: LycheeCheck
- Inherits:
-
GaddyGaddyCheck
- Object
- GaddyGaddyCheck
- LycheeCheck
- Defined in:
- lib/gg_check/plugins/Lychee.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/Lychee.rb', line 15 def status() check_result = {} result = `curl -s 127.0.0.1:80|grep "Lychee"`.strip check_result['status'] = (result.size > 1 && $?.success?) ? 0 : 2 if check_result['status'] == 2 check_result['message_key'] = 'event.not_running' check_result['status'] = 2 check_result['handlers'] = ['restart_service'] check_result['process_name'] = 'samba' end check_result end |