pastebin - collaborative debugging tool
kpaste.net RSS


Untitled
Posted by Anonymous on Mon 4th Feb 2019 03:07
raw | new post

  1. # add to nagios.cfg
  2. global_service_event_handler=test_event_handler
  3.  
  4. define command {
  5.         command_name test_event_handler
  6.         command_line /usr/local/lib/nagios/eventhandlers/test $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ $_SERVICESERVICE$
  7. }
  8.  
  9. define service {
  10.         use                                             service
  11.         host_name                               localhost
  12.         service_description             test service
  13.         check_command                   command_name
  14.         max_check_attempts              2
  15.         check_interval                  10
  16.         retry_interval                  1
  17.         _service                                test
  18. }
  19.  
  20.  
  21. # /usr/local/lib/nagios/eventhandlers/test
  22. #!/bin/sh
  23. echo "$@" > $(mktemp)

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at