Page 1 of 1

check_http -r search for sentence

Posted: Fri Apr 26, 2019 7:20 am
by JonWard50
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.

Re: check_http -r search for sentence

Posted: Fri Apr 26, 2019 2:03 pm
by scottwilkerson
This appears to work for me, you can test here:

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
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?