check http syntax
Phil Costelloe
philc at foundation-it.com
Fri Feb 21 13:13:03 CET 2003
From: Van Zee, Timothy [mailto:T-VANZEE at govst.edu]
>1st, I haven't been able to search the sourceforge.net mail archive, so
>apologies for asking a question that I'm sure has been covered many
times in the
>past. Is there anywhere else to that archives nagios questions that I
can
>search?
Sourceforge's archives can be frustatingly slow and searching is very
hit and miss. I'm sure that fact alone contributes quite a bit to the
traffic on this list. Gmane is primarily a mail to news gateway but
their web archive is an big improvement over Sourceforge though still
not ideal -
http://news.gmane.org/thread.php?group=gmane.network.nagios.user.
>2nd, in my services.cfg file I using check_http on many different
hosts. On
>some of the hosts I need to specify a different default path. At
command line I
>can use /usr/local/nagios/libexec/check_http -H 192.168.1.1 -u
/otherpath/ and I
>receive an HTTP ok: HTTP/1.1 200 OK - 0.000 second response time. How
do I
>append the check_command? I have tried the following, but the
obviously are not
>correct as they don't work:
>check_command check_http!-u!/otherpath/
>And
>check_command check_http!-u /otherpath/
>I can successfully put in the command line surrounded by double quotes,
but I
>wanted to know the proper way to append to the check_http on the
check_command
>line.
Not sure if you've had an answer to this so far. You need to add an
extra argument to the definition of check_http in checkcommands.cfg (or
create a new command so you can still use the original check_http where
that's sufficient):
define command{
command_name check_http_pathed
command_line $USER1$/check_http -H $HOSTADDRESS$ -u $ARG1$
}
Then call this as:
check_command check_http_pathed!/otherpath/
Phil
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
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