HTTP Monitoring - looking for expected output / erroring on expected output
Martijn Lievaart
m at rtij.nl
Sat Oct 30 12:08:53 CEST 2004
Rodney Caston wrote:
>We have a URL we need to monitoring across a large server farm, this URL
>when going to say a URL such as
>http://192.168.0.100/monitorfoo.cfm?test=all
>
>The expected output will look like this:
>
>CFUNSTUFF,INTWEB026,OK,N/A,0,2004-10-27 23:47:46
>INITIALJUNK4,INTWEB026,OK,N/A,125,2004-10-27 23:47:46
>JUNK10,INTWEB026,OK,N/A,1407,2004-10-27 23:47:48
>STUFF47,INTWEB026,OK,N/A,78,2004-10-27 23:47:48
>IISQUEUE5,INTWEB026,OK,N/A,31,2004-10-27 23:47:48
>
>(a list of about 20 entries like those above will appear)
>
>all that we care about is the expected value of "OK" for each line, and
>that the the site itself comes up at all, (does not give a 404, nor does
>it produce a blank screen for it's output)
>
>In the event of an error, we'd either get a 404 on the url, a "ERROR"
>where "OK" is above, or no output at all on the URL (null) so another
>possibility would be if it sees the word "ERROR" anywhere, to alarm.
>
>Is there a good way for nagios to monitor for these conditions? I can
>think of several ways Netcool ISM could do it, but I'd like to stick
>with Nagios.
>
>
>
I would write a plugin in perl. Use any of the provide plugins as a
starting point. Use wget (or similar) to get the url, and write it to
standard out, capture this output. Parse the output. Add appropriate
error handling at all points. Not very difficult to do if you know perl.
HTH,
M4
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&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