Page 1 of 1

check_http Status OK instead of Warning

Posted: Sun Jun 10, 2012 9:28 am
by cellact
Hi,
Today I saw this weird behaviour (attached)..
A check_http service check was replied with 'HTTP WARNING: HTTP/1.1 404 Not Found' but the service check remained at 'OK' status and no notifications were sent.

This is working fine for other checks.

Any ideas?

Thanks.

Re: check_http Status OK instead of Warning

Posted: Mon Jun 11, 2012 9:38 am
by scottwilkerson
Can you post the full check command that this service is executing.

Also, can you run the command from the command line, and then run

Code: Select all

echo $?
and post the output.

Thanks

Re: check_http Status OK instead of Warning

Posted: Tue Jun 12, 2012 5:59 am
by cellact
Hi,

[root@nagios ~]# /usr/local/nagios/libexec/check_http -H 10.10.1.45 -u "/url" -p 8082 -w 2 -c 5
HTTP OK HTTP/1.1 200 OK - 162 bytes in 0.004 seconds |time=0.003518s;2.000000;5.000000;0.000000 size=162B;;;0
[root@nagios ~]# echo $?
0

The service is at 'ok' status right now.

For Warning:

HTTP WARNING: - HTTP/1.1 200 OK - 0.004 second response time |time=0.004044s;0.000000;;0.000000 size=162B;;;0
[root@nagios ~]# echo $?
1

Thanks.

Re: check_http Status OK instead of Warning

Posted: Tue Jun 12, 2012 9:27 am
by scottwilkerson
If this is in the warning state and still showing green OK, I am guessing there may be some database corruption

We have a document on repairing the database
http://library.nagios.com/library/produ ... i-database