Perhaps I was not clear the first time around: Here is what I want to do: Search for the string ERROR If not found -> return OK Else -> return NOK
-----Original Message----- From: Marc Powell [mailto:[email protected]] Sent: Wednesday, August 26, 2009 4:02 PM To: Nagios User list Subject: Re: [Nagios-users] check_http and regular expressions 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 [email protected] 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 ------------------------------------------------------------------------------ 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 [email protected] 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
