check_http Status OK instead of Warning

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
cellact
Posts: 69
Joined: Mon May 14, 2012 7:00 am

check_http Status OK instead of Warning

Post 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.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_http Status OK instead of Warning

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
cellact
Posts: 69
Joined: Mon May 14, 2012 7:00 am

Re: check_http Status OK instead of Warning

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_http Status OK instead of Warning

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked