Testing Notifications
    Nelson, Ben 
    bnelson at rightnow.com
       
    Wed Apr  9 17:56:50 CEST 2003
    
    
  
I have two little command definitions defined that allow me to forcefully
test failure or success for notifications.
define command{
        command_name    return_ok
        command_line    /path/to/some/bin/nagios_test ok
}
define command{
	  command_name	return_crit
	  command_line	/path/to/some/bin/nagios_test critical
}
'nagios_test' is a shell script:
<snip>
#!/bin/sh
case $1 in
    ok)
        exit 0
        ;;
    warning)
        exit 1
        ;;
    critical)
        exit 2
        ;;
    unknown)
        exit 3
        ;;
    dependant)
        exit 4
        ;;
    *)
        exit 3
esac
</snip>
Then, if I want to test notifications I just change the service definition
to use 'return_ok' or 'return_crit' for its' check_command.
--Ben
-----Original Message-----
From: Aaron Conaway [mailto:Aaron.Conaway at HOSystems.com]
Sent: Tuesday, April 08, 2003 7:20 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Testing Notifications
Is there any way to test notifications that are configured?...I mean,
without unplugging the server to trigger them all.  
----------
Aaron Conaway
Network Engineer III
Verisign, Inc. -- Telecom Services Division
http://www.verisign.com
Office:  912.527.4343
Fax:  912.527.4014
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
    
    
More information about the Users
mailing list