[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] files test fails to work




Henrik Stoerner wrote:
On Thu, May 18, 2006 at 01:47:29PM +0000, David Gore wrote:
client-local.cfg:

       file:/export/home/nmsbb/client/tmp/TEST

hobbit-clients.cfg:

FILE %.*SNMP_COMMUNITY.public.nxg21:TEST.* yellow mtime>100

I fail to see how these two can match. The regex pattern ".*SNMP_COMMUNITY.public.nxg21:TEST.*" does not match the filename
"/export/home/nmsbb/client/tmp/TEST"


Filenames are matched with the names you provide, not some (random)
filename at the end of a symlink chain.

Correct and I understand that. I may be missing the obvious solution, but I was hoping someone would have made a suggestion after I sent a few emails.

Here is a file I want to get the 'mtime' for:

netx (at) ndcnxg21% ls -al /export/home/netx/Archive/nxg21/nxg21:SIG_SNMP/mci-nornxdb05.SNMP_COMMUNITY.public.nxg21:SIG_SNMP.2006May20
-rw-rw-rw- 1 netx other 2189103 May 20 22:49 /export/home/netx/Archive/nxg21/nxg21:SIG_SNMP/mci-nornxdb05.SNMP_COMMUNITY.public.nxg21:SIG_SNMP.2006May20


The first thing I noticed was the hobbitclient will display something like

file not found: export/home/netx/Archive/nxg21/nxg21:

It cuts the rest off regardless (at or the next character past the colon). Doesn't really matter since I have to watch a dynamic filename with `date +%Y%b%d`.

So then I realize in client-local.cfg on the server you have to have a command or file entry that will resolve to one and only one full path filename? You can, however, use a regular expression in hobbit-clients.cfg to create a line to match more than 1 file entry in client-local.cfg per host?

So how can I create something that will match this file name? I also need to match other dynamic logs, that end in a Julian date. Just remember the file name gets truncated at the colon and I was trying to work around that in combination with the dynamic filename.

Ideas?
client-local.cfg:

       file:/home/nmsmgr/GNUstep/.GNUstepDefaults

hobbit-clients.cfg:

       FILE /home/nmsmgr/GNUstep/.GNUstepDefaults yellow size<1

type:100000 (file)
mode:600 (-rw-------)
linkcount:1
owner:3200 (nmsmgr)
group:1026 (nmsadmin)
size:0
clock:1147958071 (2006/05/18-13:14:31)
atime:1147958065 (2006/05/18-13:14:25)
ctime:1147958065 (2006/05/18-13:14:25)
mtime:1146073519 (2006/04/26-17:45:19)


nmsbb (at) pdcalm105:/home/nmsbb> ls -al /home/nmsmgr/GNUstep/.GNUstepDefaults
-rw------- 1 nmsmgr nmsadmin 125 Apr 26 17:45 /home/nmsmgr/GNUstep/.GNUstepDefaults


'size' is not 0 as reported but 125 bytes, if it was 0 then it should fire an alarm, which it doesn't:

Could you send me (directly) a copy of the relevant portion of your
client's ~client/tmp/msg*.txt file, and your entire hobbit-clients.cfg file?



Regards, Henrik


To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe (at) hswn.dk