Page 1 of 1

Monitoring HTML Page Text Display

Posted: Mon Dec 24, 2012 1:58 am
by Harshal
Hi Guys,

I need to monitor the html page which changes the syntax in tow ways.
One way it shows the text "Service Is Down" .
Second way it shows the text "Services is Up"
I want NAGIOS to monitor the http page for the text change.
Whenever the html page shows the text "Service Is Down" NAGIOS should send me the alert for the same.
Any idea on how to set-up NAGIOS for monitoring the html page for the text change and send the alert for the text.

- Harshal S

Re: Monitoring HTML Page Text Display

Posted: Wed Dec 26, 2012 10:13 am
by sreinhardt
The Check_HTTP check should work perfectly for what your are asking. Something along the lines of the command below should work!

Code: Select all

check_http -H [your.website.com] -u /web/uri/path -s "Service is Up"   # Checks for service is up and returns critical if not found
Or
check_http -H [your.website.com] -u /web/uri/path --invert-regex "Service is Down"   # Checks for line service is down and returns critical if found
You can also run the check website url wizard, and add the -s or --invert -regex to the arguments after the wizard is done.