[hobbit] FILE help?
Since there has not been much response to my cries for help, here is some more info, although I do appreciate Rich S. for taking a stab at it:
Here is the config:
[hobbit at hobbit2 server]$ cat etc/hobbit-clients.cfg|grep -v '^#'
HOST=hobbit FILE /var/tmp/testfile1 yellow mtime>300
^------------------------------------- PROC /usr/sbin/cron 1 -1 yellow PROC sshd 1 20 yellow PROC hobbitlaunch 1 2 yellow DISK /backups 95 98 DISK /export/home 95 98
Here is what I believe to be the root of the problem:
[hobbit at hobbit2 server]$ ./bin/bbcmd --env=etc/hobbitserver.cfg hobbitd_client --dump-config FILE /var/tmp/testfile1 yellow mtime>0 HOST=hobbit (line: 139)
^------------------------------------------ PROC /usr/sbin/cron 1 -1 yellow HOST=hobbit (line: 140) PROC sshd 1 20 yellow HOST=hobbit (line: 141) PROC hobbitlaunch 1 2 yellow HOST=hobbit (line: 142) DISK /backups 95% 98% 0 -1 red HOST=hobbit (line: 143) DISK /export/home 95% 98% 0 -1 red HOST=hobbit (line: 144)
Yeah I know, too bad I didn't dump config at the beginning, but you probably know how it is if you work support. You have to know a lot a about a lot and you only have so much brain power (specifically memory).
Regardless as you can see my 'mtime' value is being lost. Which was hinted at in my previous emails when I said the output from the web page appeared wrong 'Should be <0'. Henrik, could I please get some feed back, even if just to acknowledge it's my fault and I have obviously messed up the configs some where?
~David
On Wed, May 24, 2006 at 03:09:28AM +0000, David Gore wrote:
Since there has not been much response to my cries for help, here is some more info, although I do appreciate Rich S. for taking a stab at it: hobbitd_client --dump-config FILE /var/tmp/testfile1 yellow mtime>0 HOST=hobbit (line: 139)
Regardless as you can see my 'mtime' value is being lost.
OK, this is a "cut-and-paste" bug. Thanks a lot for digging into this with such persistence. Does this fix it for you?
Henrik
Henrik, So far it is working beautifully! Thank you! This will help replace quite a number of instances of custom client scripts for log monitoring. Henrik Stoerner wrote:
On Wed, May 24, 2006 at 03:09:28AM +0000, David Gore wrote:
Since there has not been much response to my cries for help, here is some more info, although I do appreciate Rich S. for taking a stab at it: hobbitd_client --dump-config FILE /var/tmp/testfile1 yellow mtime>0 HOST=hobbit (line: 139)
Regardless as you can see my 'mtime' value is being lost.
OK, this is a "cut-and-paste" bug. Thanks a lot for digging into this with such persistence. Does this fix it for you?
Henrik
------------------------------------------------------------------------
--- hobbitd/client_config.c 2006/05/19 12:40:59 1.35 +++ hobbitd/client_config.c 2006/05/24 05:52:03 @@ -791,39 +792,39 @@ } else if (strncasecmp(tok, "mtime>", 6) == 0) { currule->flags |= FCHK_MTIMEMIN; - currule->rule.fcheck.minmtimedif = atol(tok+5); + currule->rule.fcheck.minmtimedif = atol(tok+6); } else if (strncasecmp(tok, "mtime<", 6) == 0) { currule->flags |= FCHK_MTIMEMAX; - currule->rule.fcheck.maxmtimedif = atol(tok+5); + currule->rule.fcheck.maxmtimedif = atol(tok+6); } else if (strncasecmp(tok, "mtime=", 6) == 0) { currule->flags |= FCHK_MTIMEEQL; - currule->rule.fcheck.mtimeeql = atol(tok+5); + currule->rule.fcheck.mtimeeql = atol(tok+6); } else if (strncasecmp(tok, "ctime>", 6) == 0) { currule->flags |= FCHK_CTIMEMIN; - currule->rule.fcheck.minctimedif = atol(tok+5); + currule->rule.fcheck.minctimedif = atol(tok+6); } else if (strncasecmp(tok, "ctime<", 6) == 0) { currule->flags |= FCHK_CTIMEMAX; - currule->rule.fcheck.maxctimedif = atol(tok+5); + currule->rule.fcheck.maxctimedif = atol(tok+6); } else if (strncasecmp(tok, "ctime=", 6) == 0) { currule->flags |= FCHK_CTIMEEQL; - currule->rule.fcheck.ctimeeql = atol(tok+5); + currule->rule.fcheck.ctimeeql = atol(tok+6); } else if (strncasecmp(tok, "atime>", 6) == 0) { currule->flags |= FCHK_ATIMEMIN; - currule->rule.fcheck.minatimedif = atol(tok+5); + currule->rule.fcheck.minatimedif = atol(tok+6); } else if (strncasecmp(tok, "atime<", 6) == 0) { currule->flags |= FCHK_ATIMEMAX; - currule->rule.fcheck.maxatimedif = atol(tok+5); + currule->rule.fcheck.maxatimedif = atol(tok+6); } else if (strncasecmp(tok, "atime=", 6) == 0) { currule->flags |= FCHK_ATIMEEQL; - currule->rule.fcheck.atimeeql = atol(tok+5); + currule->rule.fcheck.atimeeql = atol(tok+6); } else if (strncasecmp(tok, "md5=", 4) == 0) { currule->flags |= FCHK_MD5;
------------------------------------------------------------------------
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
OK, I have the patch applied, and I'm trying to get a handle on the semantics of the descriptions for mtime.
I have the following in hobbit-clients.cfg:
HOST=conn2 FILE /vsamredir/VSAMRedirectorServer.properties mtime<600 red
According to the data returned to the Hobbit server, here are the file properties:
type:100000 (file) mode:755 (-rwxr-xr-x) linkcount:1 owner:500 (rks0) group:100 (users) size:0 clock:1148474042 (2006/05/24-07:34:02) atime:1148470137 (2006/05/24-06:28:57) ctime:1093026283 (2004/08/20-13:24:43) mtime:1093026283 (2004/08/20-13:24:43)
The description of mtime is as follows:
to check if a file was updated within the past 10 minutes (600 seconds): mtime<600.
The file was not updated within the past 10 minutes, so I would expect to see green. Here is the information from the page:
red /vsamredir/VSAMRedirectorServer.properties File was modified 55447759 seconds ago - should be <0
On Wednesday 24 May 2006 6:20 am, David Gore wrote:
Henrik,
So far it is working beautifully! Thank you! This will help replace quite a number of instances of custom client scripts for log monitoring.
-- Rich Smrcina VM Assist, Inc. Main: (262)392-2026 Cell: (414)491-6001 Ans Service: (360)715-2467 rich.smrcina at vmassist.com
Catch the WAVV! http://www.wavv.org WAVV 2007 - Green Bay, WI - May 18-22, 2007
Rich Smrcina wrote:
OK, I have the patch applied, and I'm trying to get a handle on the semantics of the descriptions for mtime.
I have the following in hobbit-clients.cfg:
HOST=conn2 FILE /vsamredir/VSAMRedirectorServer.properties mtime<600 red
According to the data returned to the Hobbit server, here are the file properties:
type:100000 (file) mode:755 (-rwxr-xr-x) linkcount:1 owner:500 (rks0) group:100 (users) size:0 clock:1148474042 (2006/05/24-07:34:02) atime:1148470137 (2006/05/24-06:28:57) ctime:1093026283 (2004/08/20-13:24:43) mtime:1093026283 (2004/08/20-13:24:43)
The description of mtime is as follows:
to check if a file was updated within the past 10 minutes (600 seconds): mtime<600.
The file was not updated within the past 10 minutes, so I would expect to see green. Here is the information from the page:
red /vsamredir/VSAMRedirectorServer.properties File was modified 55447759 seconds ago - should be <0
Assuming your host is called 'conn2' and you have this in client-local.cfg:
[conn2] file:/vsamredir/VSAMRedirectorServer.properties
I would be guess, the patch did not take since your last line should read:
File was modified 55447759 seconds ago - should be <600 ^--------------------- Try this to see how your config parses (from ~/server):
bin/bbcmd --env=etc/hobbitserver.cfg hobbitd_client --dump-config|grep
conn2
It shows mtime<0. Oops... I guess I assumed this was a client patch and only applied it to the client. I'll put it on the server.
Also, I'm prefectly OK with the possiblity that this is a documentation issue.
If the functionality doesn't match the documentation, it's always easier to
change the doc. :)
On Wednesday 24 May 2006 9:50 am, David Gore wrote:
Rich Smrcina wrote:
OK, I have the patch applied, and I'm trying to get a handle on the semantics of the descriptions for mtime.
I have the following in hobbit-clients.cfg:
HOST=conn2 FILE /vsamredir/VSAMRedirectorServer.properties mtime<600 red
According to the data returned to the Hobbit server, here are the file properties:
type:100000 (file) mode:755 (-rwxr-xr-x) linkcount:1 owner:500 (rks0) group:100 (users) size:0 clock:1148474042 (2006/05/24-07:34:02) atime:1148470137 (2006/05/24-06:28:57) ctime:1093026283 (2004/08/20-13:24:43) mtime:1093026283 (2004/08/20-13:24:43)
The description of mtime is as follows:
to check if a file was updated within the past 10 minutes (600 seconds): mtime<600.
The file was not updated within the past 10 minutes, so I would expect to see green. Here is the information from the page:
red /vsamredir/VSAMRedirectorServer.properties File was modified 55447759 seconds ago - should be <0
Assuming your host is called 'conn2' and you have this in client-local.cfg:
[conn2] file:/vsamredir/VSAMRedirectorServer.properties
I would be guess, the patch did not take since your last line should read:
File was modified 55447759 seconds ago - should be <600
^--------------------- Try this to see how your config parses (from ~/server):
bin/bbcmd --env=etc/hobbitserver.cfg hobbitd_client --dump-config|grep
conn2
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Rich Smrcina VM Assist, Inc. Main: (262)392-2026 Cell: (414)491-6001 Ans Service: (360)715-2467 rich.smrcina at vmassist.com
Catch the WAVV! http://www.wavv.org WAVV 2007 - Green Bay, WI - May 18-22, 2007
On Wed, May 24, 2006 at 10:04:50AM -0500, Rich Smrcina wrote:
The description of mtime is as follows:
to check if a file was updated within the past 10 minutes (600 seconds): mtime<600.
Also, I'm prefectly OK with the possiblity that this is a documentation issue.
If the functionality doesn't match the documentation, it's always easier to change the doc. :)
I'm open to suggestions :-)
Anyway, the thing about these FILE rules is that the rules describe criteria that must be met - only when they are met will the status be green.
So "mtime<600" means "the difference between current time and the mtime of the file must be less than 600 seconds - if not, the file status will go red".
Henrik
Now it makes perfect sense, perhaps add your comment to the man/html page:
The rules describe criteria that must be met - only when they are met will the status be green.
On Wednesday 24 May 2006 3:16 pm, Henrik Stoerner wrote:
On Wed, May 24, 2006 at 10:04:50AM -0500, Rich Smrcina wrote:
The description of mtime is as follows:
to check if a file was updated within the past 10 minutes (600 seconds): mtime<600.
Also, I'm prefectly OK with the possiblity that this is a documentation issue. If the functionality doesn't match the documentation, it's always easier to change the doc. :)
I'm open to suggestions :-)
Anyway, the thing about these FILE rules is that the rules describe criteria that must be met - only when they are met will the status be green.
So "mtime<600" means "the difference between current time and the mtime of the file must be less than 600 seconds - if not, the file status will go red".
Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
-- Rich Smrcina VM Assist, Inc. Main: (262)392-2026 Cell: (414)491-6001 Ans Service: (360)715-2467 rich.smrcina at vmassist.com
Catch the WAVV! http://www.wavv.org WAVV 2007 - Green Bay, WI - May 18-22, 2007
participants (3)
-
David.Gore@verizonbusiness.com
-
henrik@hswn.dk
-
rsmrcina@wi.rr.com