We are successfully reporting on individual words on a web page with the plugin [check_http], but checking for sentences/more than one word is not working.
For example:
./check_http -H <host name> -u "/plugins/servlet/applications/versions-licenses" -w 20 -c 30 --ssl -R "license has expired" -a <user>:<password> -f follow --invert-regex
Do we need some sort of escape character to specify the spaces between each words in -R "license has expired"
Any help or suggestions appreciated.
check_http -r search for sentence
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http -r search for sentence
This appears to work for me, you can test here:
Are you sure that the string you are searching for is produced by the HTML of the page, and not via javascript after the page loads?
Code: Select all
/usr/local/nagios/libexec/check_http -H www.nagios.com -u "/" -w 20 -c 30 --ssl -R "Nagios XI provides monitoring" -f follow --invert-regex