In Website Wizard, option for Web page Regular Expression Match. What would be use of that and let me know any example for expression of the contend of webpage.
Thanks!!
Website wizard
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Website wizard
The idea with the regex match or inverse regex match is to search the content of the page you requested for a particular string, often to verify the status of something that could only be checked by looking at that page. A simple example would be:
Hope that helps!
Code: Select all
./check_http -H www.nagios.com -s yahoo - Checks for string yahoo on www.nagios.com and if found returns OK, fails if not found
HTTP CRITICAL - string not found|time=0.685802s;;;0.000000 size=38262B;;;0
./check_http -H www.nagios.com -s nagios - Checks for string nagios on www.nagios.com and if found returns OK, fails if not found
HTTP OK HTTP/1.1 200 OK - 0.709 second response time |time=0.709339s;;;0.000000 size=38332B;;;0
./check_http -H www.nagios.com --invert-regex yahoo - Checks for string yahoo on www.nagios.com and if found returns Critical, OK if not found
HTTP OK - HTTP/1.0 303 See Other - 0.128 second response time |time=0.128157s;;;0.000000 size=193B;;;0
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
gm_rajkumar
- Posts: 187
- Joined: Tue Feb 28, 2012 7:08 am
- Location: CA, USA
Re: Website wizard
Thanks!!