Nagios check_log help
Webster, Stuart SITI-ITDIUR
Stuart.Webster at shell.com
Thu Jun 5 14:24:22 CEST 2003
Thanks for the extra info, i see how it should work now,
but when i try
./check_log -F test -O test_log_tmp -q WARNING
I get the same error
./check_log: test: argument expected
I have also tried with full path names.
the test log file, just contains random lines, with one line reading WARNING
does anyone know what im doing wrong?
Thanks
Stuart
-----Original Message-----
From: Dean Bishop [mailto:dbishop at ehvert.com]
Sent: 05 June 2003 13:59
To: Webster, Stuart SITI-ITDIUR; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Nagios check_log help
Yes the -O is necessary for the script to keep track of where it left off. The plugin is a perl script. From the in-script comments:
# Description:
#
# This plugin will scan a log file (specified by the <log_file> option)
# for a specific pattern (specified by the <pattern> option). Successive
# calls to the plugin script will only report *new* pattern matches in the
# log file, since an copy of the log file from the previous run is saved
# to <old_log_file>.
#
# Output:
#
# On the first run of the plugin, it will return an OK state with a message
# of "Log check data initialized". On successive runs, it will return an OK
# state if *no* pattern matches have been found in the *difference* between the
# log file and the older copy of the log file. If the plugin detects any
# pattern matches in the log diff, it will return a CRITICAL state and print
# out a message is the following format: "(x) last_match", where "x" is the
# total number of pattern matches found in the file and "last_match" is the
# last entry in the log file which matches the pattern.
#
# Notes:
#
# If you use this plugin make sure to keep the following in mind:
#
# 1. The "max_attempts" value for the service should be 1, as this
# will prevent Nagios from retrying the service check (the
# next time the check is run it will not produce the same results).
#
# 2. The "notify_recovery" value for the service should be 0, so that
# Nagios does not notify you of "recoveries" for the check. Since
# pattern matches in the log file will only be reported once and not
# the next time, there will always be "recoveries" for the service, even
# though recoveries really don't apply to this type of check.
#
# 3. You *must* supply a different <old_file_log> for each service that
# you define to use this plugin script - even if the different services
# check the same <log_file> for pattern matches. This is necessary
# because of the way the script operates.
-----Original Message-----
From: Webster, Stuart SITI-ITDIUR [mailto:Stuart.Webster at shell.com]
Sent: June 5, 2003 7:19 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Nagios check_log help
Hello
Could some body please help me with this plugin, and explain what the proper command line arguments should be.
The documentations says:
Usage: check_log -F logfile -O oldlog -q query
Usage: check_log --help
Usage: check_log --version
i presume -F is the log file I want to check, and -q is the string I am searching the log for.
I have tried
#./check_log -F test_log -q WARNING
this just goves the following error
./check_log: test: argument expected.
what is the -O for old log?? I only have 1 log file, is the -O necessary?
the documentation for this plugin is very brief.
Help Apreciated
Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030605/233e4fe0/attachment.html>
More information about the Users
mailing list