monit-general
[Top][All Lists]
Advanced

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

Re: [monit] noob question


From: Eric Pailleau
Subject: Re: [monit] noob question
Date: Wed, 28 Apr 2010 17:38:39 +0200
User-agent: Thunderbird 2.0.0.23 (X11/20090822)

Hello
sufficient if pppd daemon fail in such case, the ppp0.pid will not content
any relevant PID linked to a process, and will monit restart by stop then start.

If your problem is that pppd is still alive and connection is in failure,
you have to remove the PID file by testing an ICMP echo request (ping)
to google or somewhat 'stable' ...

check host internet with address www.google.fr
    if failed icmp type echo count 5 with timeout 30 seconds
        then exec "/bin/rm -f /var/run/ppp0.pid"

(if deleting of pid file is sufficient to let the pppd daemon suiciding...
if not, prefere a "/usr/bin/killall pppd" )



There is a lot of very good documentation for Monit but it is a bit over my head.

What I want to do is to use Monit to open the pppoe connection on my server. When the connection fails (as happens during bad weather) then to kill the process and start it off again. The following is what I can work out but I am quite lost in knowing what to put in next. Can anyone help out please?


check process pppd with pidfile /var/run/ppp0.pid
start program = "/usr/bin/pon dsl-provider"
stop  program = "/usr/bin/poff dsl-provider"


------------------------------------------------------------------------

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

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