check_http and regular expressions

Marc Powell marc at ena.com
Wed Aug 26 22:01:33 CEST 2009


On Aug 26, 2009, at 2:49 PM, Masoud Tabrizi wrote:

> Hello All,
> I need to check on a http page and get an OK if that particular  
> string is NOT present.
> Using check_http I would like to get an OK after checking on the  
> http page if the matching string is not present on the page.
> Could someone tell me how to do this?
> I am using check_http version 1.4.9 along with Nagios 2.9
> I am currently running ./check_http -H 10.10.10.10 -p 80 -u / 
> something/something/log -a username:password -r [^ERROR]
> (if there are no ERRORS, it should return OK)

I haven't used the regex functionality but for such a simple case the  
negate plugin will work fine --

/path/to/plugins/negate /path/to/check_http -H 10.10.10.10 -p 80 -u / 
something/something/log -a username:password -s ERROR

--
Marc


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list