[Xymon] How to setup a back-up xymon server

Wim Nelis wim.nelis at ziggo.nl
Sun Feb 18 17:15:27 CET 2018


Hello Paul,

> So, here at work, I have a main proxy server, and 2 backup/proxy machines on a fairly isolated network.
>
> The proxies run on port 1984, and then a full server works on port 1985. The clients on that network only report to the backup/proxy servers.
> By default the second backup (or tertiary server) doesn't send anything to the primary. We switch tasks.cfg as needed to for it to send.
>
> The clients just send to the proxy servers, that solves the multi-source report problem.
>
> As you say, you don't want the server (gui) to run on the raspberrypi. So there are 2 things you can do for it.
>
> 1) make it a proxy not a server, and then have it report only to itself. Then configure the proxy portion to send to your main server.
> 2) Don't use the server software at all on the rpi, just use the client and turn on msgcache. Then have the client send to itself (127.0.0.1). This will save the data locally, and not even try to send to the xymon server.
>          - Then in the xymon server's hosts.cfg file you add in comments pulldata=192.168.178.71 for the rpi. That way when it reaches the machine, it downloads the data.
>          - Actually, I have issues, with some of those machines, that I have to do that for. And I have a lot of gaps in the graphs. So the proxy is probably better.

Thank you. I've followed your advice (partly). The xymonproxy is activated in 
xymonlaunch, while xymond remains active. The clients report only to "127.0.0.1", 
and are thus addressing xymonproxy. xymond is listening to port 1985 
("--listen=0.0.0.0:1985" in it's invocation  in tasks.cfg) and xymonproxy sends 
the status / data messages to two addresses: the local xymond at port 1985 and 
the primary xymon server ("--server=127.0.0.1:1985,192.168.178.72" in it's 
invocation in tasks.cfg).

The result is much better: there are no reports on multi-source status any more 
at the primary xymon server, the graphs are complete while the Wifi-connection is 
operational, but the RRD's local at the raspberry show numerous gaps during the 
time the Wifi-connection is not operational. Log file rrd-status.log contains a 
lot of messages like:

   2018-02-18 07:11:57.243938 Whoops ! Failed to send message (timeout)
   2018-02-18 07:11:57.244315 ->
   2018-02-18 07:11:57.244392 ->  Recipient '127.0.0.1', timeout 15
   2018-02-18 07:11:57.244465 ->  1st line: 'config hosts.cfg'
   2018-02-18 07:11:57.244544 Cannot load hosts.cfg from xymond, code 7
   2018-02-18 07:11:57.244616 Failed to load from xymond, reverting to file-load

The average rate of these messages (message groups) is about three times per 
hour, implying that about 9 times per hour the localhost can be reached. 
Currently I have no idea why connecting to localhost fails that often.

Regards,
   Wim Nelis.

> -----Original Message-----
> From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Wim Nelis
> Sent: Wednesday, February 14, 2018 11:01 AM
> To: xymon at xymon.com
> Subject: [Xymon] How to setup a back-up xymon server
>
> Xymon is also used to monitor my home-network. One of the clients is a raspberry
> pi 0 (rpi0, IP address 192.168.178.71), which controls the home ventilation unit
> and which will monitor more in the near future as sensors are added. Sometimes
> the Wifi-connection is not operational for some time. The obvious results are
> that status messages do not reach the xymon server (IP address 192.168.178.72),
> and that the associated graphs (RRD's) are not updated.
>
> I would like to be able to check the graphs once the network connection is
> operational again. The current solution is to install a (secondary) xymon server,
> version 4.3.28, on rpi0 as well. (Note that there is no intention to use this
> xymon server for other purposes: there is no web server active on the rpi0, nor
> would I like to have a web server on this tiny computer.) The configuration file
> /etc/default/xymon-client on rpi0, which is included in file
> /usr/lib/xymon/client/etc/xymonclient.cfg, is modified to contain the addresses
> of both xymon servers:
>
> XYMONSERVERS="127.0.0.1 192.168.178.72"
>
> The default section and the host section for rpi0 in configuration file
> /usr/lib/xymon/server/etc/analysis.cfg is the same on both xymon servers. The
> client data arrives at the primary xymon server, resulting in tests and their
> associated graphs. When the need arise, the RRD files are copied from rpi0 to the
> primary xymon server, and can then be inspected. However, it seems that the data
> arrives twice at the primary xymon server. Xymond reports:
>
> Multi-source statuses
>     rpi0:conn                 reported by 192.168.178.71 and 127.0.0.1
>     rpi0:cpu                  reported by 192.168.178.71 and 127.0.0.1
>     rpi0:disk                 reported by 192.168.178.71 and 127.0.0.1
>     rpi0:files                reported by 192.168.178.71 and 127.0.0.1
>     rpi0:inode                reported by 192.168.178.71 and 127.0.0.1
>     rpi0:memory               reported by 192.168.178.71 and 127.0.0.1
>     rpi0:msgs                 reported by 192.168.178.71 and 127.0.0.1
>     rpi0:ports                reported by 192.168.178.71 and 127.0.0.1
>     rpi0:procs                reported by 192.168.178.71 and 127.0.0.1
>
> The associated graphs one the primary xymon server are not complete: quite often
> de measurements of 2 or 3 consecutive periods of 5 minutes are missing. The xymon
> logfile rrd-status.log shows that multiple RRD updates, with slightly different
> values at about the same time, are the root cause of the incomplete graphs.
>
> In this situation I would like to stop the secondary xymon server from sending
> the test results to the primary xymon server. How can one achieve that?




More information about the Xymon mailing list