Xymon Mailing List Archive search

CLIENTHOSTNAME and hosts that use FQHNs as their hostname

2 messages in this thread

list Greg Earle · Mon, 22 Jun 2015 07:44:09 -0700 ·
Is CLIENTHOSTNAME still supported?

My group was asked to start managing some systems in our organization;
we discovered that they use FQHNs as their "hostname".  (No idea why)

I want them to report in to the Xymon server (4.3.12 on RHEL 6.3) with
the short name instead.  Strangely, on their 2 Debian Squeezy 6.0.6
systems with Xymon 4.3.0beta2, enabling CLIENTHOSTNAME works fine.

But the rest of their systems (all but one) are CentOS 5.8-5.11 and with
xymon-client-4.3.17-1.el5.centos RPMs installed, enabling CLIENTHOSTNAME
in "/etc/sysconfig/xymon-client" apparently has no effect.  They all
show up as Ghost Clients.  The temp files written to "/dev/shm" are

msg.<FQHN>.txt
xymon_vmstat.<FQHN>.<pid>
logfetch.<FQHN>.cfg

etc.  I've got CLIENTHOSTNAME set:

[root at endeavour ~]# grep ^CLIENT /etc/sysconfig/xymon-client
CLIENTHOSTNAME="endeavour"

I tried manually adding "--hostname=<short name>" to the arguments and got

	/usr/sbin/xymonlaunch: Unsupported argument: --hostname=endeavour

On the server side I tried adding the "CLIENT:<short name>" keyword:

[root at xymonserver xymon]# grep endeavour hosts.cfg
192.168.1.100	endeavour CLIENT:endeavour	# ssh 
192.168.1.100	endeavour CLIENT:endeavour	# noconn

(I also tried putting it after the "#" - hey guys, a sample "hosts.cfg"
 file with some of the optional features/keywords wouldn't hurt, y'know.)

No difference.  What am I missing?

	- Greg
list Jeremy Laidman · Thu, 2 Jul 2015 13:09:11 +1000 ·
quoted from Greg Earle
On 23 June 2015 at 00:44, Greg Earle <user-8f45ae7a27f3@xymon.invalid> wrote:
But the rest of their systems (all but one) are CentOS 5.8-5.11 and with
xymon-client-4.3.17-1.el5.centos RPMs installed, enabling CLIENTHOSTNAME
in "/etc/sysconfig/xymon-client" apparently has no effect.  They all
show up as Ghost Clients.
Maybe try adding into /etc/default/xymon-client or /etc/default/xymon?
Some systems use a different location for this file.  I think it's defined
in the xymonclient.cfg file, like so:

include /etc/sysconfig/xymon-client

Maybe check if the environment is actually being set as you expect:

$ strings /proc/`pgrep -f sh.*vmstat`/environ|egrep "HOST|MACHINE"

This will search the environment for the vmstat command run by the Xymon
client.

From what I can tell, CLIENTHOSTNAME is used, if defined.  The RHEL
(CentOS) init script looks for CLIENTHOSTNAME being defined, and if so,
appends "--hostname=<whatever>" to the command-line of runclient.sh.  This
script looks for --hostname and uses the value to defnine the env var
MACHINEDOTS=<whatever> and also use it to define MACHINE (with commas
instead of dots).  If this all works as it should, then when running
"service start xymon-client" you should see "Xymon client for Linux started
on <whatever>" and the PID file should be called
clientlaunch.<whatever>.pid (where <whatever> is what you specify in
CLIENTHOSTNAME).

Cheers
Jeremy