Page 1 of 1

http service monitoring

Posted: Fri Oct 23, 2020 3:14 pm
by nshah
Hi guys,
I have been monitoring the HTTP service for one of the IIS server. I noticed that we never receive a notification whenever the HTTP service is not working. It looks like the HTTP service never goes down but when I check the performance graph I can see there was some issue with HTTP service.
Whenever there is a problem with HTTP service the size of the B-byte (attached Screenshot) is less than size:2600B.

Is there is a way to trigger a notification on this specific service whenever the receive byte is less than 2600B send a notification?

This is a command I am using to monitor the HTTP service.

$USER1$/check_http -H $HOSTADDRESS$ -u http://10.x.x.x/mywebservice

Re: http service monitoring

Posted: Fri Oct 23, 2020 5:18 pm
by dchurch
If it's only important that the URL return more than 2600 characters, then what you can do is use the HTTP check plugin check_http to test for raw response size using regular expressions:

Code: Select all

/usr/local/nagios/libexec/check_http --linespan -r ".{2600}" -f follow -I [MYHOSTNAMEHERE] -u "/path/to/url" -S --sni -p 443
Another option would be for you to search the text that you know should exist on the page when it's being served properly:

Code: Select all

$USER1$/check_http -H $HOSTADDRESS$ -u 'http://10.x.x.x/mywebservice' -s 'your search string'