Xymon Mailing List Archive search

FILE checks

7 messages in this thread

list Sigurður Bjarnason · Tue, 6 Jun 2006 15:56:51 -0000 ·
Hi all

 
Hope this is not a stupid question :D

 
Just installed the 4.2 beta, its looking good, although I have just one problem so far, and that is with FILE checking. I did setup checks in the hobbit-client.cfg file 

 
HOST=cc-1

        UP      1h

        LOAD    5.0 10.0

        DISK    * 90 95

        MEMPHYS 100 101

        MEMSWAP 50 80

        MEMACT  90 97

        PROC    apache 1 -1 yellow TRACK=apache

        PORT STATE=LISTEN LOCAL=%0.0.0.0[.:].* EXLOCAL=%[.:](22|80|443) TRACK=httpd

        FILE /var/log/messages yellow SIZE>0 MTIME<600 TRACK

 
Everything is working except the graph for the FILE check is not showing up ?... any ideas ?

 
Best Regards

Siggi
list Henrik Størner · Tue, 6 Jun 2006 18:33:04 +0200 ·
quoted from Sigurður Bjarnason
On Tue, Jun 06, 2006 at 03:56:51PM -0000, Sigurður Bjarnason wrote:
        FILE /var/log/messages yellow SIZE>0 MTIME<600 TRACK

Everything is working except the graph for the FILE check is not showing up ?... any ideas ?
Congratulations! You found the first bug in the beta :-)

It wasn't tracking filesizes for log-files. This should solve it.


Regards,
Henrik

-------------- next part --------------
--- hobbitd/hobbitd_client.c	2006/06/04 21:03:41	1.84
+++ hobbitd/hobbitd_client.c	2006/06/06 16:32:33
@@ -11,7 +11,7 @@
 /*                                                                            */
 /*----------------------------------------------------------------------------*/
 
-static char rcsid[] = "$Id: hobbitd_client.c,v 1.84 2006/06/04 21:03:41 henrik Exp $";
+static char rcsid[] = "$Id: hobbitd_client.c,v 1.85 2006/06/06 16:32:29 henrik Exp $";
 
 #include <stdio.h>
 #include <string.h>
@@ -874,6 +874,17 @@
 			sfn = swalk->sname+8;
 			sprintf(sectionname, "logfile:%s", sfn);
 			onecolor = check_file(hinfo, clientclass, sfn, swalk->sdata, sectionname, filesummary, &sz, &trackit, &anyrules);
+			if (trackit) {
+				/* Save the size data for later DATA message to track file sizes */
+#ifdef _LARGEFILE_SOURCE
+				sprintf(msgline, "%s:%lld\n", sfn, sz);
+#else
+				sprintf(msgline, "%s:%ld\n", sfn, sz);
+#endif
+				addtobuffer(sizedata, msgline);
+				anyszdata = 1;
+			}
• if (!anyrules) {
 				/* Dont clutter the display with logfiles unless they have rules */
 				continue;
list Sigurður Bjarnason · Wed, 7 Jun 2006 09:24:16 -0000 ·
How proud I am  :D

This fixes the problem, thanks Henrik...

Best Regards
Siggi
quoted from Henrik Størner


-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: 6. júní 2006 16:33
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] FILE checks

On Tue, Jun 06, 2006 at 03:56:51PM -0000, Sigurður Bjarnason wrote:
        FILE /var/log/messages yellow SIZE>0 MTIME<600 TRACK

Everything is working except the graph for the FILE check is not showing up ?... any ideas ?
Congratulations! You found the first bug in the beta :-)

It wasn't tracking filesizes for log-files. This should solve it.


Regards,
Henrik
list James Roberts · Thu, 7 Aug 2008 10:22:20 +0100 ·
I am getting so annoyed...
Have added this line in the defaults section of  localclient.cfg
FILE  /etc/hosts YELLOW noexist
And have added

[hostname]
file:/etc/hosts

Into client-local.cfg..

And although /etc/hosts exists I am still showing green???

The client data shows..

[file:/etc/hosts]
type:100000 (file)
mode:664 (-rw-rw-r--)
linkcount:1
owner:0 (root)
group:0 (system)
size:183979
clock:1218100844 (2008/08/07-10:20:44)
atime:1218100839 (2008/08/07-10:20:39)
ctime:1213367146 (2008/06/13-15:25:46)
mtime:1213367146 (2008/06/13-15:25:46)


So why isnt my alert going yellow?
list James Roberts · Fri, 8 Aug 2008 08:52:11 +0100 ·
any ideas what is going wrong?
quoted from James Roberts


From: Roberts, James [mailto:user-d7df29bbad83@xymon.invalid] Sent: 07 August 2008 10:22
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] File checks


I am getting so annoyed... Have added this line in the defaults section of  localclient.cfg FILE  /etc/hosts YELLOW noexist And have added 
[hostname] file:/etc/hosts <file:/etc/hosts>  
Into client-local.cfg.. 
And although /etc/hosts exists I am still showing green??? 
The client data shows.. 
[file:/etc/hosts <file:/etc/hosts> ] type:100000 (file) mode:664 (-rw-rw-r--) linkcount:1 owner:0 (root) group:0 (system) size:183979 clock:1218100844 (2008/08/07-10:20:44) atime:1218100839 (2008/08/07-10:20:39) ctime:1213367146 (2008/06/13-15:25:46) mtime:1213367146 (2008/06/13-15:25:46) 

So why isnt my alert going yellow?
list Henrik Størner · Fri, 8 Aug 2008 08:00:45 +0000 (UTC) ·
In <user-d4aa06d0efc6@xymon.invalid> "Roberts, James" <user-d7df29bbad83@xymon.invalid> writes:

Are you running the Hobbit client in the default (server-side 
configuration) or the local client-side configuration mode ?

If the former, then modifying localclient.cfg has no effect;
all of your configuration must be done on the Hobbit server.

If the latter, then You must make all changes on the client
side: In client-local.cfg, and hobbit-clients.cfg


Henrik
list James Roberts · Fri, 8 Aug 2008 09:21:57 +0100 ·
Thanks works a treat!! 
quoted from Henrik Størner

-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] 
Sent: 08 August 2008 09:01
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] File checks

In <user-d4aa06d0efc6@xymon.invalid>
"Roberts, James" <user-d7df29bbad83@xymon.invalid> writes:

Are you running the Hobbit client in the default (server-side
configuration) or the local client-side configuration mode ?

If the former, then modifying localclient.cfg has no effect; all of your
configuration must be done on the Hobbit server.

If the latter, then You must make all changes on the client
side: In client-local.cfg, and hobbit-clients.cfg


Henrik