Page 1 of 1

Need help in check_http

Posted: Tue Aug 07, 2018 9:48 am
by aditya.c.anand
Hello Team,

We have a scenario where a URL is getting monitored via "check_http".
The check is throwing warning alert which is not getting monitored by our monitoring team.
This plugin will attempt to open an HTTP connection with the host. Successful connects return STATE_OK, refusals and timeouts return STATE_CRITICAL other errors return STATE_UNKNOWN.
Successful connects, but incorrect response messages from the host result in STATE_WARNING return values.

Can you please help, how we can convert this warning into critical alert, so that we can get this monitored.

Your help will be much appreciated.

Re: Need help in check_http

Posted: Tue Aug 07, 2018 10:49 am
by rexconsulting
Hi Aditya,

See /usr/local/nagios/libexec/negate. You'll want "-w critical" and "-s". Check out this example:

Code: Select all

/usr/local/nagios/libexec/negate -s  --warning=2 "/usr/local/nagios/libexec/check_dummy 1  WARNING"

Re: Need help in check_http

Posted: Tue Aug 07, 2018 12:58 pm
by cdienger
Thanks for the assist, Chris!

@aditya.c.anand, let us know if this has resolved your problem.