Yep, great suggestion.

James Moseley




                                                                           
             Kevin Keane                                                   
             <subscript...@kke                                             
             ane.com>                                                   To 
                                                                           
             02/27/2009 01:59                                           cc 
             PM                        nagios-users@lists.sourceforge.net  
                                                                   Subject 
                                       Re: [Nagios-users] check_http       
                                       question                            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




You could write your own plugin - a simple bash script - that calls the
original check_http, tests the result, and then outputs whatever you
need. Should be about five or six lines of code. Don't forget to return
the same exit code as what you got from check_http.

# call the regular plugin here
output=$(...../check_http .....)
result=$?
# output whatever you need. You can of course also make it conditional with
# if [ $result -eq 0 ] or similar. Get as fancy as you want, just keep
the output to a single line.
echo $url $output
exit $?

Put it into your plugin directory, make it executable, and use that
instead of the original call to check_http.

Don't you love how customizable Nagios is?




------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Nagios-users mailing list
Nagios-users@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

Reply via email to