monit-general
[Top][All Lists]
Advanced

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

[monit] How to configure a multi-homed host check?


From: Landon Cox
Subject: [monit] How to configure a multi-homed host check?
Date: Fri, 7 Nov 2008 15:43:50 -0700


Hi monit users,

I'm trying to figure out the configuration syntax to have monit check the interface health of a machine with two NICs, but can't find any examples.

Ideally, I'm looking for something along the lines of:

check host tweedledum with address 10.0.0.20 192.168.5.200
    if failed icmp type echo count 3 with timeout 5 seconds then alert
    group tweedledum

the above example is erroneous because there's no way (that I know of) to specify two addresses on a single check host.

The closest I can get is two complete check host statements such as:

check host tweedledum-eth1 with address 10.0.0.20
    if failed icmp type echo count 3 with timeout 5 seconds then alert
    group tweedledum

check host tweedledum-eth0 with address 192.168.5.100
    if failed icmp type echo count 3 with timeout 5 seconds then alert
    group tweedledum

But that won't do what I want to do which is: alert only if both interfaces are unreachable, but if one interface is unreachable and the other is reachable, I don't want an alert.

Is there a way to say "AND" everything in a group, so that if one fails, the group fails or conversely, only if all services in a group fail would the group be considered "failed" and some action performed?

What would the appropriate syntax be to achieve the behavior described, specifically the 2-NIC scenario?

Thanks,

Landon




reply via email to

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