logfile scrubbing

8lb4fmllhm001 at sneakemail.com 8lb4fmllhm001 at sneakemail.com
Thu Aug 15 22:22:06 CEST 2002


I've been fiddling with the logfile scrubbers, trying to get them to work properly.  No joy.

First I was checking out check_log, but out of the box (at least on Red Hat 7.3) it doesn't work.  I ended up munging the script, just to get it to work from the command line.  From Nagios, it just didn't seem to work.

I checked out check_log2.pl (under contrib), seeing as how it uses seek/tell, instead of copying over entire logfiles.  That works fine from the command line, but again, once I stuff it into Nagios, I get output like:

Aug 14 21:47:14 myhost nagios: Warning: Return code of 127 for check of service 'Messages Scrubber #1' on host 'webmonk' was out of bounds. Make sure the plugin you're trying to run actually exists.

I went back, over and over again, and I swear I have the definitions set up right.  Here's the relevant snippet from  checkcommands.cfg:

define command{
        command_name    check_local_log2
        command_line    $USER1$/check_log2 -l $ARG1$ -s $ARG2$ -p $ARG3$
        }

and here's the relevant bit from services.cfg:

define service{
       use                             icmp
       host_name                       myhost
       service_description             Messages Scrubber #1
       contact_groups                  linux-admins
       max_check_attempts              1
       check_command                   check_local_log2!/var/log/messages!/tmp/check_log.messages-errors.seek!error
       }

I set it to /tmp/check_log.messages-error.seek, since I wasn't certain where it would be writing if I specified a relative pathname.  (That's one part of the documentation which seems to be vague/lacking.)

Suggestions on how to debug this?

-----------------------------------------------------
Protect yourself from spam, use http://sneakemail.com


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390




More information about the Users mailing list