FILE checks
list Sigurður Bjarnason
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
▸
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
How proud I am :D This fixes the problem, thanks Henrik... Best Regards Siggi
▸
-----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
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
any ideas what is going wrong?
▸
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
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
Thanks works a treat!!
▸
-----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