Executing a script based on text from a web page

Joseph Devaney jdevaney at blackducksoftware.com
Fri Aug 6 16:16:55 CEST 2010


I know that nagios can monitor pages for certain text on that page to verify that its there.  In our organization we have several monitors like this currently setup and they work well for us.  I want to take this operability and apply it to a webpage that only appears when there is a server error and have it kick off a script to restart a service.

This is for a website within the company.  When there are too many mysql connections, the site itself will not be displayed but will display a friendly error for us to perform a flush of the hosts.  This error doesnt occur often and when it does occur, it doesn't always happen when someone is awake to address it.  Basically what I want to happen is for nagios to monitor a website and if/when this error appears (I will set the check_command to look for the right text) nagios will execute a script to restart that service.  99% of the time, the site will be up and functioning as it should be, so I am not sure how to write this one up without giving a false positive on our monitors.

Any thoughts on how to implement this?




Joseph Devaney | Jr. Linux Systems Administrator | Black Duck Software | v: 781-810-1334  | m: 781-974-6729 | jdevaney at blackducksoftware.com<mailto:jdevaney at blackducksoftware.com> | 265 Winter St, Waltham, MA 02451




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100806/ad779ed5/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
-------------- next part --------------
_______________________________________________
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