check_http regex question

Jeremy C. Reed reed at reedmedia.net
Thu Jul 19 00:05:09 CEST 2007


> Have a quick question about what regular expression to use to check a web
> page.
> 
> The web page is for some Trango wireless backhaul units.  On the main page
> the status will say 'connected' if the backhaul units are talking to each
> other.  Otherwise, the status is 'disconnected'.
> 
> I have tried:
> 
> ./check_http -H 10.252.0.158  -r connected      returns OK all the time
> ./check_http -H 10.252.0.158  -r \(connected\)  returns OK. all the time
> 
> any idea on how to setup the regex?

Try:

"[^s]connected"

Not an "s" immediately before connected. Unless it is start of line. We 
may need more details.

Or if there is a space, search like (add a space before it):

-r " connected"

  Jeremy C. Reed

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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