Hi All! I am trying to implement check_logfiles and it is not behaving the way I expect and I was hoping that someone might be able to help . My config-file looks like this:
$seekfilesdir = '/var/tmp'; $protocolsdir = '/var/tmp'; @logs = ( { tag => 'jimmo', logfile => '/tmp/messages', criticalpatterns => [ 'Handling the connection'], }, ); If I copy /var/log/messages to /tmp/messages and then run /usr/local/nagios/libexec/check_logfiles -v -f /tmp/jimmo_somelogfiles.cfg I get the output that I expect: CRITICAL - (5293 errors in jimmo_somelogfiles.protocol-2008-04-03-13-38-58) - Apr 3 13:38:42 nts-mgm-17 nsca[327]: Handling the connection... ...|jimmo_lines=33772 jimmo_warnings=0 jimmo_criticals=5293 jimmo_unknowns=0 If I run the command again it finds nothing, which I expect. If I delete the seek and protocol files in /var/tmp, I would expect that that script starts over. It has no information about the state, so it must logically start over from the beginning of the file. However, it doesn't and I get: OK - no errors or warnings|jimmo_lines=0 jimmo_warnings=0 jimmo_criticals=0 jimmo_unknowns=0 If I add lines with 'Handling the connection' to /tmp/messages and run check_logfiles again, it finds the lines I just added. If I remove /tmp/messages and re-create after deleting the state files, it reports the correct number of matches. It seems that the state information is being kept somewhere other than /var/tmp. The default is /tmp, but I found nothing there. Any ideas if/where state data is being kept and/or how to force the script to think that it should read the file from the beginning? Best Regards, Jim Mohr ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null