Check_HTTP

Andreas Ericsson ae at op5.se
Thu Apr 8 23:13:01 CEST 2004


Thomas Quinlan wrote:
> All,
> 
> I have a webserver, serving a page called "page.do"
> out of /directory/, and on that page is a string
> called "string".
> 
> When I execute the following on the command line:
> 
> /usr/nagios/libexec/check_http -w 5 -c 10 -u
> /directory/page.do -s string
> 
> it works perfectly, as expected.  If I change "string"
> to "somethingelse", I get an error, as expected.
> 
> When I add this to a service for a hostgroup in
> Nagios:
> 
> check_http!-w 5!-c 10!-u /directory/page.do!-s string
> 
> It tells me that the page is up.  However, if I change
> "string" to "somethingelse", it still tells me that it
> is up.
> 
> In fact, no matter what I do, it tells me that there
> is an HTTP page (even getting rid of the directory).
> 
> Can anyone think of why this would happen?
> 
Your command-definition with command_name check_http might not allow 
arguments to be passed. In this case you might want something that looks 
like this;
define command{
	command_name	check_http_page
	command_line	/usr/local/nagios/libexec/check_http -H $HOSTADDRESS$ -w 
$ARG1$ -c $ARG2$ -u $ARG3$ -s $ARG4$

and a service-check with a check_command line like this;
	check_command	check_http_page!5!10!/directory/page.do!string

> Thanks.
> 
You're welcome.

> Tom
-- 
Mvh / Best Regards
Sourcerer / Andreas Ericsson
OP5 AB
+46 (0)733 709032
andreas.ericsson at op5.se


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
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