[hobbit] files test fails to work

David Gore David.Gore at verizonbusiness.com
Sun May 21 17:04:14 CEST 2006



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!

>> 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
>
>
>   




More information about the Xymon mailing list