On Tue, Sep 13, 2011 at 4:12 PM, Natxo Asenjo <[email protected]> wrote:
> hi,
>
> we have quite a few multihomed hosts and we would like to monitor them
> using the $ADDRESSES$ macro.
>
> I have a service check that looks like this:
>
> check_icmp -H $ADDRESSES$ -w 100.0,20% -c 500.0,60%
>
> but if I apply it to a template with hosts that only have one address
> we get UNKNOWN errors:
>
> check_icmp: Failed to resolve -w
>
> According to http://docs.opsview.com/doku.php?id=opsview-community:host:
>
> "If other addresses are not defined, but the $ADDRESSx$ macros are
> used, $ADDRESSx$ will default to the primary IP address of the host.
> $ADDRESSES$ is left undefined. "
>
> does undefined mean: we return an unknown error?
>
> Managing 2 sets of templates for multihomed and not multihomed hosts
> is not practical. Is there another way?

ok, I will answer my own question. It is possible to do, we need to
fill in in the host configuration, 'other hostnames/ips' field also
the primary address (also for hosts with just one address).

Then we can use check_icmp which accepts several addresses like
$ADDRESS1$ $ADDRESS2$ ...., if only the first one exists, only that
one will be checked.

Really nice, thanks opsview team for this.

-- 
natxo
_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to