There is a file in the nagiosplug contrib called check_log2.pl.  It makes a temporary file with the byte offset from the last check so it starts the new check at the old offset.   For the new lines, it does regular  _expression_ matching.

 [EMAIL PROTECTED] contrib]$ perl ./check_log2.pl -h
check_log2.pl (nagios-plugins 1.4) 1.1
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Scan arbitrary log files for regular _expression_ matches.

Usage: check_log2.pl -l <log_file> -s <log_seek_file> -p <pattern> [-n <negpattern>]
Usage: check_log2.pl [ -v | --version ]
Usage: check_log2.pl [ -h | --help ]

-l, --logfile=<logfile>
    The log file to be scanned
-s, --seekfile=<seekfile>
    The temporary file to store the seek position of the last scan
-p, --pattern=<pattern>
    The regular _expression_ to scan for in the log file
-n, --negpattern=<negpattern>
    The regular _expression_ to skip in the log file


Cheers,

- Harper

Harper Mann
Groundwork Open Source Solutions
510-599-2075 (cell)

Julie S. Lin wrote:
Hi All,

Does anyone here know if there's a plug in to nagios that will allow monitoring of
syslogs and or integrates monitoring done via scripts?  I'd like to integrate my monitoring.

--jsl


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Nagios-users mailing list
[email protected]
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

Reply via email to