Hi Ed, The 10 minute interval is actually an artifact of the run frequency (1x to download the updated file, but not used until the next run). For testing, or any other purpose, simply increase the 'INTERVAL' in the client section of clientlaunch.cfg to something more frequent than that. (I tend to use 100s instead of 5m.) There's nothing sacrosanct about that interval, so as long as your systems can handle additional traffic and incoming message load, it can be lowered below 5m as desired (shouldn't be raised higher than 5m). The only real negative side effect is that you'll see more "process spam" in the form of simultaneous backgrounded vmstat processes. HTH, -jc On Wed, January 13, 2016 6:43 am, EDSchminke at Hormel.com wrote:
Hi Jeremy,
Thanks for your reply.
First, I am aware of the 10 minute interval. I did observe that when working with an AIX system. I mention that because I am able to get log monitoring to work there, but not with a Linux system. That is to say, I do get a "logfetch.[hostname].cfg" file in $XYMONHOME/tmp, and changes come in approx ten minutes after being made on the XYMON server at $XYMONHOME/etc/client-local.cfg
Is there anything I can do to reduce the 10 minute interval for testing purposes?
----- Entering "xymoncmd"
[root at lpcobwas2p ~]# su - xymon -bash-4.1$ export XYMONCLIENTHOME=/home/xymon/client -bash-4.1$ client/bin/xymoncmd sh-4.1$ whoami xymon sh-4.1$ pwd /home/xymon sh-4.1$
---- All files in /home/xymon are owned by xymon, group xymon and are writable
sh-4.1$ find . ! -writable sh-4.1$ find . ! -user xymon sh-4.1$ find . ! -group xymon sh-4.1$
$XYMONTMP/msg.$(hostname).txt is getting updated every five minutes, as expected:
sh-4.1$ ls -la client/tmp/msg.$(hostname).txt -rw-rw-r--. 1 xymon xymon 152566 Jan 13 08:00 client/tmp/msg.lpcobwas2p.hfc.ad.txt sh-4.1$ ls -la client/tmp/msg.$(hostname).txt -rw-rw-r--. 1 xymon xymon 148917 Jan 13 08:05 client/tmp/msg.lpcobwas2p.hfc.ad.txt sh-4.1$
----- I sent this file manually to the xymon server, but got no output
sh-4.1$ $XYMON $XYMSRV "@" < $XYMONTMP/msg.lpcobwas2p.hfc.ad.txt sh-4.1$
----- Sending your suggested test string yields the following:
sh-4.1$ $XYMON $XYMSRV "@" << EOT client $MACHINE.linux linux EOT log:/var/log/messages:10240 ignore MARK sh-4.1$ echo $MACHINE lpcobwas2p,hfc,ad sh-4.1$
Interesting... but a) why doesn't that come back with the message file and b) it still doesn't match the hostname
-----
Lastly.. I'm still not clear on the correct format of a hostname definition for client/etc/client-local.cfg
Should it be
lpcobwas2p (just hostname) lpcobwas2p.hfc.ad (period) lpcobwas2p,hfc,ad (commas)
Thanks,
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
_______________________________________________ Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon