[Top][All Lists]

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

Re: about monit.conf

From: Kenneth
Subject: Re: about monit.conf
Date: Mon, 5 Mar 2007 17:40:08 +0800

It is a rather old version v4.4 and v4.7.

Anyway, the last time it crashed was around half a year ago.
My cron job is there since monit 4.1. As it is running fine, I just
leave it there, just in case.

As the server is extremely busy, it might be the reason why it failed.
FYI, I am using the init method (adding monit into the inittab) since I start
using monit from v4.1. I am not sure whether it is the same in v4.9, but the
result was a few monit daemon running at the same time and none of them work
(ps shows a few monit daemon, but running 'monit status' shows nothing
but an error message saying monit is not running blah blah blah....)

I have new monit implementation on monit v4.8.2 without any cronjob to
restart it and it has been running for 4 months without problem.


----- Original Message ----- From: "Martin Pala" <address@hidden>
To: "This is the general mailing list for monit" <address@hidden>
Sent: Monday, March 05, 2007 4:35 PM
Subject: Re: about monit.conf

This looks strange - if monit crashes in your environment then i'm very interesting for more details to fix the root cause of the problem.

Which monit version do you use? (can you try monit 4.9?)

Also note that the integration of monit with init is probably better then running/checking monit from cron. See FAQ - question no. 7:


Kenneth wrote:
Yes, I run monit as deamon and this is the way it should be.

My cron job is simple. Simply call 'monit status' and grep for
something that should appear, say, one of your service to be
checked. If monit is not running, 'monit status' will return nothing but
an error message.

If the service is not found (grep return status 1), simply call 'monit quit', then restart monit and run all necessary monit command that your site required.

If your services are running, restarting monit daemon will not affect

I am not sure this works for everyone, but it works fine for me  :)
The cron job is run every night and it seems to me that monit usually
won't die within a short period of time after starting.

----- Original Message ----- From: "Atsushi Tamae" <address@hidden>
To: "This is the general mailing list for monit" <address@hidden>
Sent: Monday, March 05, 2007 10:10 AM
Subject: Re: about monit.conf

Hello Kenneth,

Please let me know how to do so ?
Do you run monit as daemon ?

Atsushi Tamae

Kenneth wrote:
Yes, that's why I have cron job to monitor monit and
restart it if necessary every day.

----- Original Message ----- From: "Atsushi Tamae" <address@hidden> To: "This is the general mailing list for monit" <address@hidden>
Sent: Monday, March 05, 2007 9:59 AM
Subject: Re: about monit.conf


The reason why we want to run monit as cron was
I worried about monit daemon suddenly stop.
To use monit for monitoring specific service did not want
to stop. But we use monit as daemon mode, we have to care
about monit daemon process instead of specific daemon.

Somebody think about that ?

Atsushi Tamae

hans wrote:
I am still confused about running monit from crond.
If run monit every 5 minutes why no to change the poll time to 5
minutes and run it as demon.
Run monit from crond is not very cool because you loose a lot of
functions of monit that make monit great.
Please, someone tell me what its the goal of running monit from crond.
Regards Hans.

On 3/2/07, Martin Pala <address@hidden> wrote:
Also note that in this mode the "if 5 restarts within 5 cycles then
timeout" has no effect for the same reason - it will work only in daemon


Martin Pala wrote:
> When you call monit from cron, then it will check the current
> state, start the failed processes, send the alarm and gracefuly > exit.
> When monit isn't running as daemon, it doesn't keep the state
for > the
> previous cycle.
> When you want monit to send email for both events (failure in
one > cycle
> and recovery in next cycle) then you should run monit in daemon
> rather then from cron.
> Martin
> Atsushi Tamae wrote:
>> Hello,
>> I install monit to redhat linux ES 4 with >>
>> %monit -V
>> This is monit version 4.9
>> Copyright (C) 2000-2007 by the monit project group. All Rights
>> And configured for monit as like follows:
>> #check snmptrapd
>> check process snmptrapd with pidfile /var/run/
>>    start program = "/etc/init.d/snmptrapd start"
>>    stop program = "/etc/init.d/snmptrapd stop"
>>    if failed port 162 type udp then restart
>>    if 5 restarts within 5 cycles then timeout
>> #check radiusd
>> check process radiusd with pidfile /var/run/radiusd/
>>    start program = "/etc/init.d/radiusd start"
>>    stop program = "/etc/init.d/radiusd stop"
>>    if 5 restarts within 5 cycles then timeout
>> #check tacacs server
>> check process tacacs with pidfile /var/run/
>>   start program = "/etc/init.d/tacacs start"
>>   stop  program = "/etc/init.d/tacacs stop"
>>   if 5 restarts within 5 cycles then timeout
>> And I confiured to run monit in crontab like follows:
>> */5     *       *       *       *       root monit validate
>> And I shutdown some process like snmptrapd, to test monit.
>> But I found monit mail as follows:
>> 'snmptrapd' process is not running
>> 'snmptrapd' trying to restart
>> 'snmptrapd' start: /etc/init.d/snmptrapd
>> 'snmptrapd' failed to start
>> But snmpdtrapd process is already up when I saw this mail.
>> Please let me know what should I do if I want to recieve mail
result like 'snmptrapd' success to start.
>> I mean not 'snmptrapd' failed to start.
>> Thanks
>> Atsushi Tamae

To unsubscribe:

reply via email to

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