monit-general
[Top][All Lists]
Advanced

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

Re: Monitoring a network interface


From: Martin Pala
Subject: Re: Monitoring a network interface
Date: Fri, 13 Aug 2004 01:15:22 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040810 Debian/1.7.2-2

Hi,

we discussed such feature in the past - the syntax of these triggers could be something like this:

 if <x> <event> within <y> cycles then <action>

where:
.. x      = number of given event type occurences
.. event  = event type trigger restriction/specification
.. y      = number of cycles
.. action = what to do


The event engine could be extended to provide this functionality - famous quotation: 'it needs only to be implemented' ;)

Martin

Chris Boot wrote:
Hi all,

I've recently begun to use monit to monitor my server, and boy does it come in handy! Cheers for this great little piece of software.

Now I'd like to set up a monitor to test network connectivity. Ideally, what I'd like to do, is to ping and HTTP connect to a couple of hosts and if they're down, bring down and bring back up again my external interface, eth1. If they are brought down say 5 times in 5 cycles and it's still not working, reboot. At the moment I have:

check host debian with address www.debian.org
       group connectivity
       start program = "/sbin/ifup eth1"
       stop  program = "/sbin/ifdown eth1"
       if failed icmp type echo with timeout 15 seconds then alert
       if failed port 80 proto http then restart

check host apple with address www.apple.com
       group connectivity
       start program = "/sbin/ifup eth1"
       stop  program = "/sbin/ifdown eth1"
       if failed port 80 proto http then restart

Now this just restarts the interfaces as soon as a problem is detected, which works but is a bit clunky, as you might imagine. Is there any way to make, for example, something like the following (that monit doesn't like)?

check host debian with address www.debian.org
       group connectivity
       start program = "/sbin/ifup eth1"
       stop  program = "/sbin/ifdown eth1"
       if failed icmp type echo with timeout 15 seconds then alert
       if failed port 80 proto http then alert
       if 3 alerts within 3 cycles then restart
       if 3 restarts within 20 cycles then exec "/sbin/reboot"

Thanks for any help!
Chris



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





reply via email to

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