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

Re: [hobbit] files test fails to work





David Gore wrote:


David Gore wrote:


Henrik Stoerner wrote:
On Sat, May 20, 2006 at 11:01:06PM +0000, David Gore wrote:

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

-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


I think the colons in the filename are the problem. A ':' is also the delimiter in file "file:FILENAME[:hash]" entry in client-local.cfg, so when parsing the "file:..." line it cuts off the filename at the first colon.

It should work if you use the 'run-command-to-generate-filenames'
thing, i.e. in client-local.cfg you have
   file:`/usr/local/bin/snmpfilename`
and then the /usr/local/bin/snmpfilename script on your client host
generates these filenames.

Well, it works now, but I reported it not working on May 13 at 15:39 GMT using the same command technique.

It is still has some issues, however. Here is what the output looks like on the web page:

yellow /export/home/netx/Archive/nxg21/nxg21:SIG_SNMP/mci-nornxdb05.SNMP_COMMUNITY.public.nxg21:SIG_SNMP.2006May21

File was modified 154 seconds ago - should be <0

yellow
/export/home/netx/Archive/nxg21/nxg21:TEST/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:TEST.2006May16


File was modified 476411 seconds ago - should be <0

'should be <0' ? Perhaps that should be what the test is in hobbit-clients.cfg entry:

       FILE "%.*SIG_SNMP.*" yellow mtime<300
       FILE "%.*TEST.*" yellow mtime<100

'should be <300' and 'should be <100'?

Both Rich Smrcina and I think that reads backwards, but it's not that big of a deal. If I have it correctly, it reads as, 'if file mtime is NOT less than 300 seconds then alarm'? Assuming that, the *TEST* file is firing a yellow alarm correctly, the test for the *SNMP* file is also reported as yellow, that would not be correct. If I change both tests to '>' they remain green.

For completeness here is the client-local.cfg:

file:`ls -drt /export/home/netx/Archive/nxg21/nxg21*SIG_SNMP/*|tail -1`
file:`ls -drt /export/home/netx/Archive/nxg21/nxg21*TEST/*|tail -1`

Thank you for your hard work on Hobbit!
Since, I haven't heard anything, is it something I have wrong?
Today's specifics:

The web page:

yellow /export/home/netx/Archive/nxg21/nxg21:SIG_SNMP/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:SIG_SNMP.2006May23
File was modified 157 seconds ago - should be <0


yellow /export/home/netx/Archive/nxg21/nxg21:TEST/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:TEST.2006May16.Z
File was modified 32905 seconds ago - should be <0


client data:

[file:/export/home/netx/Archive/nxg21/nxg21:TEST/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:TEST.2006May16.Z]
type:100000 (file)
mode:600 (-rw-------)
linkcount:1
owner:108 (netx)
group:10 (staff)
size:1866
clock:1148389840 (2006/05/23-13:10:40)
atime:1148369697 (2006/05/23-07:34:57)
ctime:1148357239 (2006/05/23-04:07:19)
mtime:1148357239 (2006/05/23-04:07:19)

[file:/export/home/netx/Archive/nxg21/nxg21:SIG_SNMP/mci-nornxdb06.SNMP_COMMUNITY.public.nxg21:SIG_SNMP.2006May23]
type:100000 (file)
mode:666 (-rw-rw-rw-)
linkcount:1
owner:108 (netx)
group:1 (other)
size:45134
clock:1148389840 (2006/05/23-13:10:40)
atime:1148389707 (2006/05/23-13:08:27)
ctime:1148389686 (2006/05/23-13:08:06)
mtime:1148389686 (2006/05/23-13:08:06)

[clientversion]


hobbit-clients.cfg:

       FILE "%.*SIG_SNMP.*" yellow mtime<300
       FILE "%.*TEST.*" yellow mtime<900

client-local.cfg:

file:`ls -drt /export/home/netx/Archive/nxg21/nxg21*SIG_SNMP/*|tail -1`
file:`ls -drt /export/home/netx/Archive/nxg21/nxg21*TEST/*|tail -1`



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?

Correct.


Regards, Henrik


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




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




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