monit-general
[Top][All Lists]
Advanced

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

Re: Monit from crontab?


From: Martin Pala
Subject: Re: Monit from crontab?
Date: Sat, 26 Mar 2011 21:07:35 +0100

Hello,

you can run monit in daemon mode even as non-root user ... add the following 
statement to the monitrc:

set daemon <number>

... where the number is count of seconds which should monit wait between 
monitoring cycles. The advantage of running monit as deamon is, that it is 
aware of state changes - if the service will fail, it will send one alert to 
you and next if it recovers. If you'll run it from cron, it will validate the 
services but won't keep the previous state, so you will be alerted every cycle 
as long as the service is down and you won;t get notification if recovered (no 
error on start => silence).


If you really want to run it from cron, then you can use monit's CLI command 
"validate":

* * * * * /usr/bin/monit validate


Regards,
Martin


On Mar 25, 2011, at 8:08 PM, Aubrey Jaffer wrote:

> I want to set up a monitor which sends an email if a website goes
> down.  I don't have root access on the machine I will run Monit on.
> The Monit documentation describes how to modify /etc/inittab to run
> Monit, but is silent as to how to run Monit from the crontab program.
> 
> Because Monit looks for a control-file in ~/.monitrc, it would seem
> that Monit should be usable for non-root users.
> 
> Can Monit be run from crontab?
> 
> If so, should Monit be started as a daemon when run from crontab?
> 
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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