[Xymon] How to run multiple xymonnet processes?
Christoph Zechner
zechner at vrvis.at
Wed May 26 07:28:21 CEST 2021
Hi,
On 26/05/2021 02:55, Jeremy Laidman wrote:
> Hi all
>
> We have a lot of net tests that take a lot of time, mostly DNS.
There's not a lot we can do to reduce the time it takes to run these
tests. The end result is that xymonnet takes in excess of 10 minutes to
finish a polling cycle, causing missing data points in RRD files.
>
> Our Xymon server is not heavily loaded, so it could quite easily cope
with running two copies of xymonnet. But I need a way to distribute the
hosts between the two. Does anyone have suggestions about how to do this?
>
> It'd be neat if I could run xymonnet saying "only run tests for these
hosts" on one instance, and "run tests for all except these hosts" on
another. But this doesn't seem possible. The nearest to this seems to be
the "NET:<netname>" tag, but I don't know how to use the combination of
XYMONNETWORK and "--test-untagged" to do what I need. Also, I'm not sure
that there won't be other side-effects to abusing the NET: tag in this way.
I also would use the NET: tag for this. In our network, we have lots of
different network segments separated from each other and one machine,
which runs xymon proxy that does the network checks for them.
Look in your tasks.cfg file, there's the default [xymonnet] task. You
can easily define multiple checks just like it, for example:
[xymonnetabc]
ENVFILE /usr/lib/xymon/server/etc/xymonserver.cfg
#NEEDS xymond
CMD XYMONNETWORK=abc xymonnet --report --ping --checkresponse
--concurrency=4
LOGFILE $XYMONSERVERLOGS/xymonnet.log
INTERVAL 5m
[xymonnetdef]
ENVFILE /usr/lib/xymon/server/etc/xymonserver.cfg
#NEEDS xymond
CMD XYMONNETWORK=def xymonnet --report --ping --checkresponse
--concurrency=4
LOGFILE $XYMONSERVERLOGS/xymonnet.log
INTERVAL 5m
[xymonnetghi]
ENVFILE /usr/lib/xymon/server/etc/xymonserver.cfg
#NEEDS xymond
CMD XYMONNETWORK=ghi xymonnet --report --ping --checkresponse
--concurrency=4
LOGFILE $XYMONSERVERLOGS/xymonnet.log
INTERVAL 5m
This way, you can check three networks ("abc", "def", "ghi") separately.
Note: "concurrency=4" is not strictly needed, we just use it to limit
the number of concurrent connection to lighten the load on our xymon
machine.
Don't forget to define [xymonnetagain] checks the same way if you need
them for each segment/network.
In my opinion, this should work perfectly for your use case.
Cheers
Christoph
>
> Another idea I had was to construct two new hosts.cfg files from the
original (and all included files) and tell two xymonnet instances to use
these other hosts.cfg files (perhaps by overriding HOSTSCFG?).
>
> Any suggestions?
>
> Cheers
> Jeremy
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
More information about the Xymon
mailing list