Naplax
 
Home
REL (Remote Execution Layer) Addon
Logsurfer Plugin
Process Monitor Plugin
Windows Eventlog Addon
Download
Support
 

Hosted by
SourceForge Logo
 

Logsurfer Plugin

This is an alternative Nagios plugin for checking logfiles. As the name implies, it's just a wrapper around the Logsurfer program.

Logsurfer needs to be be on your path to make this plugin work, or you have to modify the logsurfer variable directly in the script. Because native logsurfer does not store the offset position where processing stopped on the last run, this wrapper will do the job and feed logsurfer with the correct data.

gzipped and rotated logfiles will be handled correctly.

A "Critical" state is returned if logsurfer writes one or more lines on stdout as configured in the given config file. "OK" state is returned if logsurfer finds nothing.

Note: Logsurfer is invoked without the '-f' option, because we want to monitor "multilog" (qmail) logfiles, which would not be rotated if -f had been used.

Usage: check_logsurfer.pl -f <LOGFILE> -c <LOGSURFER_CONFIG> 
           -s <STAT_FILE> [-r ROTATION_MODE]
LOGFILE = the file to check with logsurfer.
STAT_FILE = the file where the offset (line last processed) 
  and time of processing is stored.
LOGSURFER_CONFIG = the logsurfer configuration file to use.
ROTATION_MODE = Specifies how the given logfile is rotated. If this 
  option is omitted, then rotation will be detected, but only the 
  current logfile is processed.
  If given, then ROTATION_MODE should be 'SUSE', 'QMAIL', 'LOGROTATE' 
  or a regular expression that can be used to identify the rotated 
  logfiles.
  The logfiles to process will then be identified by its modification 
  time (mtime).