Problem with check_log
James M. Albright
jalbr at groupwise.umn.edu
Wed Nov 19 15:35:34 CET 2003
I have to be doing something wrong. It seems I can see the log with
nagios but am unable to alert on my situation.
here is what I have wrote to the log file.
Nov 19 08:11:04 zumbro.oit.umn.edu JMA: [ID 702911 local7.info] Hello
World
and here is what my command looks like in nrpe.cfg
command[check_local7]=/usr/local/nagios/libexec/check_log -F
/var/local_logs/candle/oracle -q "*/[ID 702911 local7.info/] Hello
World"
when ever I run this command from nagios I get "Log check ok - 0
pattern matches found"
any help would be great thank
Jim A.
>>> "Phil Costelloe" <philc at foundation-it.com> 11/18/2003 3:38:45 AM
>>>
> 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
This e-mail and its attachments have been scanned for viruses.
EAS - Systems Support, OIT, University of Minnesota
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
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