On 9/18/2017 8:30 AM, Jeremy Ruffer wrote:
I'm on RHEL 6 which is probably the same.
In /etc/sysconfig/xymon-client there is a CLIENTHOSTNAME= line.
Are you, perhaps, running the terabitha package of Xymon? I have no such
file here. As mentioned earlier, I've compiled from source.
For my machine, I have borrowed the terabithia systemd service-file. It
fires off xymonlaunch with:
ExecStart=/opt/xymon/server/bin/xymoncmd /opt/xymon/server/bin/xymonlaunch
--no-daemon $XYMONLAUNCHOPTS
My tasks.cfg has the client to be run with:
ENVFILE /opt/xymon/client/etc/xymonclient.cfg
CMD /opt/xymon/client/bin/xymonclient.sh
LOGFILE $XYMONSERVERLOGS/xymonclient.log
INTERVAL 5m
The xymonclient.sh contains the pertinent line:
echo "client $MACHINE.$SERVEROSTYPE $CONFIGCLASS" >> $MSGTMPFILE
When I change $MACHINE to $MACHINEDOTS, the client behaves as expected,
and sends messages under its fully qualified domain name.
It looks to me like the behavior of uname on my host isn't relevant. The
xymonclient.sh is specifically writing the short name rather than the long.
Now what isn't clear to me, is where $MACHINE is picking up the short
name. I had expected it to hold the old-school "comma name". The only place
I can fine $MACHINE being assigned a value is in runclient.sh. As far as I
can tell, my chain of commands does not invoke that script but goes
straight for xymonclient.sh.
Right now, it looks like I have two options:
A) Modify xymonclient.sh to use MACHINEDOTS
B) Use a CLIENT tag in my hosts.cfg to accept the short name
I dislike the use of CLIENT tags, but in this case prefer it to
remembering to patch the client script if I ever rebuild my software.
--
Do things because you should, not just because you can.
John Thurston XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska