|
|
On Mon, 19 May 2008 12:28:04 -0700, scarolan wrote:
> I would like to know if any of you use cfengine for monitoring URLs and
> web servers, and if so what is the best way to go about configuring URL
> monitors.
>
> I would like to build some logic like this. URLs A, B, and C are served
> up by httpd running on linuxhost1. If URLs A, B, and C are all down,
> AND the httpd service is down then cfengine should only alert my pager
> one time.
>
> Our current monitoring system (brand X) alerts the administrator for
> each and every URL when apache dies, this can be 30-40 or more SMS
> pages, repeated every 10 or 15 minutes. Its annoying because the alerts
> do not tell us anything about which server the URL lives on.
>
> I am hopeful that cfengine can rectify this situation, possibly even
> restarting apache when it arises. But for starters I would like to get
> the alerts under control and make sure that when apache or tomcat dies
> that we are not bombarded with URL alerts.
>
> Any suggestions are most welcome. I'd like to hear how other cfengine
> users would tackle this problem. I am open to using a hybrid solution
> like nagios + cfengine to make this work.
Nagios is the correct solution for the situation you describe. It can be
configured to make the http requests, analyse the response and alert if
an anomoly occurs. It will not repeat the alerts until the service comes
back up again. It also detect rapid transitions between up and down
(flapping). Once a servie has been marked down, nagios can go into
escalation mode, where is sends additional alerts to contacts configured
as escalation recipients.
Cfengine can be used on the server to restart httpd if it is completely
down, but because it runs periodically, there may be a delay before
apache is restarted.
There is a package called daemontools (if I remember correctly) which
will monitor critical daemons and restart them. They can be configured to
back off if the daemon keeps crashing.
Cfengine is a useful tool for many things, but the problems you have are
best solved with tools that are designed for the process.
regards,
Frank Ranner
references:
daemontools
About:
daemontools is an extensive collection of tools for managing UNIX
services. It includes tools for starting, restarting, stopping,
monitoring and logging any services that you might wish to run on a UNIX
machine.
Author:
Daniel J. Bernstein <djb |at| pobox |dot| com> [contact developer]
Homepage:
http://cr.yp.to/daemontools.html
|
|