Problem with check_log

Phil Costelloe philc at foundation-it.com
Tue Nov 18 10:38:45 CET 2003


> From: James M. Albright [mailto:jalbr at groupwise.umn.edu] 
> 
>   I have nrpe working great, but I have run into a problem.  
> I want to check a log for a patter it seems to be finding the 
> log but I must have the patter part messed up here is what I 
> have in my nrpe.cfg file.
> 
> command[check_local7]=/usr/local/nagios/libexec/check_log -F 
> /var/local_logs/candle/oracle -q '[ID 702911 local7.info] Hello World'
> 
> I keep getting  "Log check ok - 0 pattern matches found"  
> even after I write Hello World to the log 
> Any help would be great thanks 

The square brackets (and indeed any other special characters) have to be
escaped. The query string is used as the pattern for a grep, so 'man
grep' for details.

command[check_local7]=/usr/local/nagios/libexec/check_log -F
/var/local_logs/candle/oracle -q '\[ID 702911 local7.info\] Hello World'

Phil


-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list