Class: WindowsPrintServerCheck
- Inherits:
-
GaddyGaddyCheck
- Object
- GaddyGaddyCheck
- WindowsPrintServerCheck
- Defined in:
- lib/gg_check/plugins/WindowsPrintServer.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 27 |
# File 'lib/gg_check/plugins/WindowsPrintServer.rb', line 15 def status() check_result = {} result = `curl -s 127.0.0.1:631|grep "CUPS"`.strip if (result.size > 1 && $?.success?) && process_alive?("/usr/sbin/smbd") 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'] = 'samba' end check_result end |