[patch] honour client hostname from /etc/default/xymon-client
Hi, I've encountered a rather annoying bug when using local mode on clients on Debian [1], but I am sure it's also a problem on other Linux distros. When the machine is set to LOCALMODE="yes" in /etc/xymon/xymonclient.cfg, it stops using the hostname provided by /etc/default/xymon-client set via CLIENTHOSTNAME= there and instead uses "hostname -f". It does this because in the Debian init script it checks for a variable called MACHINEDOTS (which only exists on xymon servers, not clients) and uses "hostname -f" as a fallback. In my opinion, a client in local mode should still honour the client hostname set in the /etc/default/xymon-client file, so I propose the following change in xymonclient.cfg: --- A 2021-12-23 13:34:11.000000000 +0100 +++ B 2021-12-23 13:44:37.024340994 +0100 @@ -42,6 +42,8 @@ # Local options for xymond_client (Ignored when not in local mode) LOCAL_CLIENTOPTS="" +# honour hostname set in /etc/default/xymon-client +MACHINEDOTS=$CLIENTHOSTNAME # Compatibility settings HOBBITCLIENTHOME="$XYMONCLIENTHOME" Setting the MACHINEDOTS variable like this ensures it still uses the one defined in /etc/default/xymon-client thus behaving like expected. Please let me know if this solution is acceptable for you or if we should resolve this matter in another way. Thanks in advance! Best regards Christoph Zechner [1] OS: Debian 10/11 stable
participants (1)
-
zechner@vrvis.at