monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Restarting monit when if it fails and Inittab


From: Thomas Oppel
Subject: Re: Restarting monit when if it fails and Inittab
Date: Mon, 15 Jul 2002 18:55:50 +0200
User-agent: KMail/1.4.1

Am Montag, 15. Juli 2002 18:04 schrieb Nick Hall:
> I recently installed monit since I've heard it works well for
> monitoring processes (mainly I wanted it for Apache). This is
> probably a novice mistake but I put monit as a respawn
> process in /etc/inittab since I thought that in the case that
> monit could crash (which may be very unlikely), I wanted a
> way for it to be restarted automatically, or at the very least,
> I be notified. Every couple days I would get a bunch of alerts
> that Apache was restarted at the same time and often when I
> looked Apache wasn't even running after all that. What was
> happening was that as time passed more and more monit processes
> were being spawned and I had 10 separate ones trying to restart
> Apache at the same time. I see monit has a "-I" option to run
> from Init but I can't find any documentation about what that
> specifically does. Does anyone know if this would be something
> I should run to fix the problem of multiple monit processes
> being spawned? Or even better, what is the better way of trying
> to insure that monit stays running? I thought about creating
> another monit config to just make the sure first copy of monit
> is running. Are people doing it this way or just not worrying
> about monit crashing? Thanks for the help,
>
> Nick

There's an indirect way, if that helps until our heros return to list from 
holidays.

Put this in your crontab:
0 * * * * [/usr/bin/]monit -c [ConfigFile] status

With monit-2.5 this should display monit's + watched daemons' uptimes hourly.

L.
-- 
Kourentis und Br├╝ggemann
Informationssysteme GbR.
Rheinallee 72 - 53173 Bonn
Tel.  0228 / 3635 07
Fax.  0228 / 3635 09
Mobil 0163 / 5635830



reply via email to

[Prev in Thread] Current Thread [Next in Thread]