Xymon Mailing List Archive search

Ping Mulitple IPs Per System?

3 messages in this thread

list Ken Shackelford · Fri, 23 Aug 2013 17:53:47 +0000 ·
Hello,

        I've been given the task of migrating from an old Big Brother installation to Xymon and have managed to get just about
everything migrated except for one small thing.  We have fair number of WAN routers at various locations and are currently
monitoring them on both their internal Ethernet interface and on their external Serial interface.  These entries show up on the
same line in the BB screen complete with graphs, etc.  It appears the person who implemented this copied the bb-network.sh
and modified it to use a different file than bb-hosts and runs it out of the "ext" directory.  I've found the "xymonnet" program
that does much the same thing as bb-network.sh, but there is no way to specify a different configuration file other than hosts.cfg.

        In short, is there a way to have a second IP address for a system and have Xymon produce a second "conn" (or whatever
name) column for that IP?   I know I could just add two entries to hosts.cfg ("machine" and "machine.serial" or some such), but that
seems a bit like a kludge.

        Any suggestions?

Thanks,
Ken
list Jeremy Laidman · Mon, 26 Aug 2013 13:05:00 +1000 ·
quoted from Ken Shackelford
On 24 August 2013 03:53, Shackelford, Ken <user-bcfca0412b01@xymon.invalid>wrote:
 I’ve found the “xymonnet” program
that does much the same thing as bb-network.sh, but there is no way to
specify a different configuration file other than hosts.cfg.
Yes there is.
quoted from Ken Shackelford

        In short, is there a way to have a second IP address for a system
and have Xymon produce a second “conn” (or whatever
name) column for that IP?   I know I could just add two entries to
hosts.cfg (“machine” and “machine.serial” or some such), but that
seems a bit like a kludge.
I would think that running xymonnet with a different hosts.cfg file is a
bigger kludge.  But I think this option is better for operators.

You can run xymonnet and specify HOSTSCFG to point to the hosts.cfg file
you want.  The default setting, defined in xymonserver.cfg is
"$XYMONHOME/etc/hosts.cfg".  In the same way you can define a different
column for ping tests, as defined by the CONNTEST environment variable.  So
you could run a second xymonnet out of tasks.cfg/tasks.d like so:

 [xymonnetping2]
        ENVFILE /usr/lib/xymon/server/etc/xymonserver.cfg
        NEEDS xymond
        CMD HOSTSCFG=$XYMONHOME/etc/hosts2.cfg xymonnet CONNTEST=conn2
--report --ping --dns-timeout=3
        LOGFILE $XYMONSERVERLOGS/xymonnet.log
        INTERVAL 5m

J
list Mark Deiss · Mon, 26 Aug 2013 12:24:47 +0000 ·
From the hosts.cfg man page:

conn={best,|worst,}IP1[,IP2...]
This adds additional IP-adresses that are pinged during the normal "conn" test. So the normal "conn" test must be enabled (the default) before this tag has any effect. The IP-adresses listed here are pinged in addition to the main IP-address.

When multiple IP's are pinged, you can choose if ALL IP's must respond (the "worst" method), or AT LEAST one IP must respond (the "best" setting). All of the IP's are reported in a single "conn" status, whose color is determined from the result of pinging the IP's and the best/worst setting. The default method is "best" - so it will report green if just one of the IP's respond to ping.


The problem I had with this approach is that if you wanted to test a bunch of VIPs and console IP for a given server, there is nothing that identifies what is what. All you get is each IP and it's state. I prefer to add comments for each IP to be embedded in the web display. To that end created an external test that would parse the hosts.cfg for ip declarations that would optionally contain descriptions to be displayed with the associated IP. If you want that, I can dig it out and send it to you.
quoted from Ken Shackelford

From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Shackelford, Ken
Sent: Friday, August 23, 2013 1:54 PM
To: xymon at xymon.com
Subject: [Xymon] Ping Mulitple IPs Per System?

Hello,

        I've been given the task of migrating from an old Big Brother installation to Xymon and have managed to get just about
everything migrated except for one small thing.  We have fair number of WAN routers at various locations and are currently
monitoring them on both their internal Ethernet interface and on their external Serial interface.  These entries show up on the
same line in the BB screen complete with graphs, etc.  It appears the person who implemented this copied the bb-network.sh
and modified it to use a different file than bb-hosts and runs it out of the "ext" directory.  I've found the "xymonnet" program
that does much the same thing as bb-network.sh, but there is no way to specify a different configuration file other than hosts.cfg.

        In short, is there a way to have a second IP address for a system and have Xymon produce a second "conn" (or whatever
name) column for that IP?   I know I could just add two entries to hosts.cfg ("machine" and "machine.serial" or some such), but that
seems a bit like a kludge.

        Any suggestions?

Thanks,
Ken