[Nagiosplug-devel] Issues with old check_log.sh

Tobias Heinzmann Tobias.Heinzmann at shd-online.de
Mon Oct 22 18:30:21 CEST 2007


nagiosplug-devel at lists.sourceforge.net


Hi,

I had an installation where simple logfile monitoring was
required, so I chose check_log.sh. Its an old shell script
that basically does an egrep while remembering where it
last read within an "memory file". In my case it runs on every 
monitored system and is called with NRPE and NSCA.

During the installation I encountered some issues:

- The examples within the script refer to an older version
- If run the first time it just copies the log file to old log
   without doing any checks so that all matches are lost.

And (in my opinion) a bug:

- If no write permissions to the old log file are given 
   (what easily could happen if called via nsca/ nrpe), 
   it exits with status "okay", although it should be "unknown".


Enclosed is a patch that solves this issues at my installations,
maybe you can use it...


Cheers
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_log.sh.patch
Type: application/octet-stream
Size: 1445 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20071022/042f9af9/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3104 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20071022/042f9af9/attachment.bin>


More information about the Devel mailing list