monit-general
[Top][All Lists]
Advanced

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

Re: [monit] alert restarts service


From: gorlist
Subject: Re: [monit] alert restarts service
Date: Fri, 18 Apr 2008 03:55:52 +0300

Thanks for the reply.
I understand.

1. Whenever I stop it manually though it only sends a "Does not exist
Service sshd" message and the date. It does not follow the default
more detailed format that ends with "Your faithful employee, monit".
Why?

2. What would be a good way to implement a 'hacky' remote host service
restart? Like quick and dirty fix.

3. I have a problem when sending mails. I use postfix, I have it
configured to "Internet site" and sometimes it does not let monit send
the alert mail. The mail command will succeed with all hosts (3/3).
When monit does it, it only succeeds with gmail.com (1/3). The other
two is yahoo.com and my own mailserver.

4. How is monit allowed to start and stop services, since AFAIK only
root is privileged to do so.


On Fri, Apr 18, 2008 at 1:22 AM, Martin Pala <address@hidden> wrote:
> Hi,
>
>  the restart action when monitored process exits is implicit.
>
>  We plan to add options to allow to override the default behavior:
>  http://www.tildeslash.com/monit/doc/next.php#36
>
>  Since the process existence comes before socket testing, in your case monit
> detects that ssh is not running and restarts it. The socket/port related
> alert action was not even evaluated (since it makes no sense when process is
> not running).
>
>  If you want to cleanly stop process which is monitored by monit, you should
> do "monit stop ssh", so monit will perform the stop (otherwise when the
> process exists out of monit control, monit tries to fix the problem).
>
>
>  Remote hosts can be monitored using "check host" statement ... currently it
> is not possible to restart remote services (just alerts). The possibility to
> restart remote services will be part of M/Monit.
>
>
>  We don't have IRC channel for support currently.
>
>
>  Cheers,
>  Martin
>
>
>
>
>
>  gorlist wrote:
>
> >
> >
> >
> > Hello,
> >
> > firstly let me say a big thank you to the developers for such a wonderful
> tool.
> >
> > So my monitrc looks like this:
> >  check process sshd with pidfile /var/run/sshd.pid
> >   start program  "/etc/init.d/sshd start"
> >   stop program  "/etc/init.d/sshd stop"
> >   if failed port 22 protocol ssh then alert
> >
> > The thing is that if I stop the sshd manually, the next cycle it
> > displays "Does not exist", sends an email to the global address and
> > after that it starts the daemon.
> > That means 2 cycles after I stop the sshd, it starts it even if I
> > haven't specified restart (I have only alert).
> > Why does it do that?
> >
> > Also, is there a way that I can monitor daemons on remote hosts and
> > restart them if needed? If yes, how?
> >
> > Finally, is there an IRC channel or something except this list to get
> support?
> >
> > Thank you
> >
> >
> > --
> > To unsubscribe:
> > http://lists.nongnu.org/mailman/listinfo/monit-general
> >
>
>
>  --
>  To unsubscribe:
>  http://lists.nongnu.org/mailman/listinfo/monit-general
>




reply via email to

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