monit-general
[Top][All Lists]
Advanced

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

Re: Alerts on restart


From: Jan-Henrik Haukeland
Subject: Re: Alerts on restart
Date: 12 Jun 2003 02:50:39 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

Nils Ohlmeier <address@hidden> writes:

> Hi,
> 
> On Tuesday 03 June 2003 12:48, Martin Pala wrote:
> > Nils Ohlmeier wrote:
> > >But i have a little questions:
> > >is it possible to send alert messages only if monit (re)started the
> > > program because it detected the failure of the program?
> >
> > Maybe i don't understand exactly what are you asking for. Do you want to
> > differ starts which were made by monit because of:
> >
> > 1.) monit detected failure during protocol, resource tests, etc.
> > (process is running but functionality test failed)
> > 2.) or wheter monit detected that the program isn't running at all
> > (process doesn't exist)
> 
> sorry for being not precise. What i meant is:
> It is possible to differ between a (re-)start of a program because monit 
> detected any error. 

Please disregard my previous mail. I was wrong. Actually, monit does
*only* send an alert message if the program was started due to an
error (i.e. it does not run). Doing 'monit (re)start prog' from the
command line does not send an alert at all!

> Or because a user called from a command line 'monit start foobar'
> (probably the user stoped the programm before this for some
> maintance and starts it now again).

If the user stopped a program to do some maintainance and forgot to
turn of the monit daemon, then the monit daemon will of course start
the program again and send an alert because the program was not
running. If this happened right after the user issued a 'monit start
prog'[1] then of course the user may think that this command resulted
in the alert message which of course is not the case. In other words
it's a coincidence which lead to the wrong conclusion :-)

The proper thing to do in a maintenance situation with a monit daemon
running in the background monitoring a program is to:

1) Do 'monit stop prog' This will make the monit daemon stop the
   program and not check it anymore.

2) Do maintenance

3) Do 'monit start prog' This will make monit start the program again
   as well as start monitoring the program again.


[1] 'monit start prog' does not warn you if the program is already
running (as it did before) it silently does nothing. To see if a
program is already running you can do: 'monit status'.


-- 
Jan-Henrik Haukeland




reply via email to

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