Page 1 of 1

Website wizard

Posted: Fri Dec 28, 2012 12:59 am
by gm_rajkumar
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!!

Re: Website wizard

Posted: Fri Dec 28, 2012 10:34 am
by sreinhardt
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:

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
Hope that helps!

Re: Website wizard

Posted: Mon Dec 31, 2012 5:07 am
by gm_rajkumar
Thanks!!