check_http Question

Corey Mosher corey.mosher at gmail.com
Mon Jun 27 21:32:06 CEST 2005


I have a page that I want to check on a remote server to see what the
content is.  The content returned is like this:

Testing
1 Item Locked

What I want to check is whether the number is greater than 8 or not. 
If so it should become CRITICAL.  My check command is using check_http
and looks like this right now:

/usr/lib/nagios/plugins/check_http -H hostname.domain.com -u
/status.txt -r "([0-9]+) Item Locked"

Now this only detects whether the content has that line or not.  What
I need is to use regex grouping to get the value and test that it's
below a certain number (8).  How can I do this?  Am I even using the
correct approach?

Thanks in advance

-- 
Corey Mosher
corey.mosher at gmail.com
http://www.twistymcgee.com/


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
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