check_http returning success full results on aurlwhich is down

Marc Powell marc at ena.com
Thu Jan 24 18:35:19 CET 2008



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Darren McMillan
> Sent: Thursday, January 24, 2008 11:13 AM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] check_http returning success full results
on
> aurlwhich is down
> 
> Hi Mark, All,
> 
> First thanks for the quick response I appreciate your help.
> 
> The test harness is run by a simple batch script on each client
machine,
> if I execute it the harness is on & I can verify that with the
following
> command from command line, using the -s that you suggested.
> 
>  ./check_http  -I 10.77.40.123 -p 2000 -s "QA-testHarness"
> 
> HTTP OK HTTP/1.1 200 OK - 0.340 second response time
> |time=0.339870s;;;0.000000 size=5505B;;;0
> 
> If i close the harness I correctly get the following response with the
> same command
> 
> Connection refused
> HTTP CRITICAL - Unable to open TCP socket

Good.

> I've edited my commands.cfg to include the -s
> 
> command_line $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$
-s
> $ARG3$
> 
> Within my windows.cfg I have altered check command for check_http to
> include the -s.
> 
> check_command            check_http!2000!/test/results!QA-testHarness
> 
> Please correct me if I am wrong with either of these two, I'm still
> getting to grips with the proper syntax to use here.

Yes, the ARGx use is correct now. I assume that when it's working, your
test harness actually displays the text 'QA-testHarness' in the page.
 
> So I do a pre-flight check & reboot nagios, then via the web interface
I
> force a service check on check_http with the harness down so I should
get
> an error, however it still passes successfully.
> 
> My apache logs show no errors, and the following for the checks.
> 
> 127.0.0.1 - nagiosadmin [24/Jan/2008:16:56:01 +0000] "GET /nagios/cgi-
> bin/extinfo.cgi?type=2&host=PONGO&service=HTTP HTTP/1.1" 200 9709
> "http://localhost/nagios/cgi-bin/status.cgi?host=all" "Mozilla/5.0
(X11;
> U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070417 Fedora/2.0.0.3-4.fc7
> Firefox/2.0.0.3"

You want to check the web server logs on the machine running your test
harness. That's the server returning the 200 OK that nagios is properly
accepting as successful. You'll want to verify that the request is
actually for the host/port/url you think it is.

However, based on what you've shown above and your previous post, I
suspect that you have multiple copies of nagios running, one with an old
configuration and one with the new. Stop nagios and make sure it's
really stopped, then start again.

--
Marc


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/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





More information about the Users mailing list