[Xymon] log monitoring hostname matching trouble

EDSchminke at Hormel.com EDSchminke at Hormel.com
Mon Jan 18 20:01:33 CET 2016


I think I've got this figured out.  It's now behaving as expected.

The root of my problem seemed to be the fact that the xymon client on the
monitored system was running in "local mode".  I removed the "--local" from
the CMD line of the [client] block in $XYMONCLIENTHOME/etc/clientlaunch.cfg

The existence of this line in my msg file was what clued me to that; this
line no longer exists now that the client message.
@@client#1|1|127.0.0.1|lpcobwas2p.hfc.ad|linux

Once I cleared that up, I determined that when trying to match hostname in
client-local.cfg, it matches based on what you have defined in hosts.cfg

Server:
[root at lxcobxymonp etc]# grep lpcobwas2p hosts.cfg
0.0.0.0         lpcobwas2p # CLIENT:lpcobwas2p.hfc.ad
[root at lxcobxymonp etc]# sed -n '70,71 p' client-local.cfg
[lpcobwas2p]
log:/var/log/messages:9997
[root at lxcobxymonp etc]#

Thanks everyone for your help!


Erik D. Schminke | Associate Systems Programmer
Hormel Foods Corporation | One Hormel Way | Austin, MN 55912
Phone: (507) 434-6817
edschminke at hormel.com | www.hormelfoods.com





From:	Jeremy Laidman <jlaidman at rebel-it.com.au>
To:	EDSchminke at hormel.com
Date:	01/12/2016 08:03 PM
Subject:	Re: [Xymon] log monitoring hostname matching trouble



Erik

Hmm. It's hard to know what might be wrong.  First, note that it can take
some time (10 minutes maybe) for the cfg file to appear.

Check your ~xymon/client/tmp/ directory and ensure that the xymon user can
write there (probably should have owner and group both as "xymon").

Then, see if you have a client message temp file there with something like

ls -l ~xymon/client/tmp/msg.*.txt

This should show the hostname that the Xymon client is using, as part of
the filename.  It will also show the permissions, which should make the
file writeable by the xymon user.  Also, check the first line of the file
(eg: head -1 ~xymon/client/tmp/msg.*.txt) and see if the hostname listed
there is what you're expecting.

Try sending the msg.*.txt file via the xymon client message, and see if you
get the cfg file as output:

$ ~xymon/client/bin/xymoncmd
$ $XYMON $XYMSRV @ < $XYMONTMP/msg.*.txt
$ exit

Or even just:

$ ~xymon/client/bin/xymoncmd
$ echo "client $MACHINE.linux linux" | $XYMON $XYMSRV @

(Substitute "linux" for your OS.)

Cheers
Jeremy

On Sat, Jan 9, 2016 at 3:10 AM <EDSchminke at hormel.com> wrote:

  Hello,

  I'm trying to get log monitoring to work on a new implementation of Xymon
  (v4.3.24)

  For whatever reason, my client doesn't seem to be receiving a
  logfetch.cfg
  file from the server after it checks in.  I've tried a number of
  combinations of hostname and none of them seem to work:

  [lpcobwas2p] (hostname only)
  [lpcobwas2p.hfc.ad] (FQDN, periods)
  [lpcobwas2p,hfc,ad] (FQDN, commas)

  None of them seem to work.

  Any ideas?

  Server side:

  [root at lxcobxymonp server]# pwd
  /home/xymon/server
  [root at lxcobxymonp server]# hostname
  lxcobxymonp.hfc.ad
  [root at lxcobxymonp server]#

  [root at lxcobxymonp server]# tail -2 etc/client-local.cfg
  [lpcobwas2p]
  log:/var/log/messages:20480
  [root at lxcobxymonp server]#

  [root at lxcobxymonp server]# grep lpcobwas2p etc/hosts.cfg
  0.0.0.0         lpcobwas2p # CLIENT:lpcobwas2p.hfc.ad
  [root at lxcobxymonp server]#

  Client side:

  [root at lpcobwas2p client]# pwd
  /home/xymon/client
  [root at lpcobwas2p client]# hostname
  lpcobwas2p.hfc.ad
  [root at lpcobwas2p client]#

  [root at lpcobwas2p client]# head -2 tmp/msg.lpcobwas2p.hfc.ad.txt
  @@client#1|1|127.0.0.1|lpcobwas2p.hfc.ad|linux
  client lpcobwas2p,hfc,ad.linux linux
  [root at lpcobwas2p client]#


  Erik D. Schminke | Associate Systems Programmer
  Hormel Foods Corporation | One Hormel Way | Austin, MN 55912
  Phone: (507) 434-6817
  edschminke at hormel.com | www.hormelfoods.com


  _______________________________________________
  Xymon mailing list
  Xymon at xymon.com
  http://lists.xymon.com/mailman/listinfo/xymon




More information about the Xymon mailing list