[Nagiosplug-devel] [ nagiosplug-Bugs-1593073 ] Check_Log problem with log rotation

SourceForge.net noreply at sourceforge.net
Thu Jan 25 20:03:28 CET 2007


Bugs item #1593073, was opened at 2006-11-09 01:13
Message generated for change (Comment added) made by msparhawk
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1593073&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mark Sparhawk (msparhawk)
Assigned to: Nobody/Anonymous (nobody)
Summary: Check_Log problem with log rotation

Initial Comment:
Release 1.4.5

In cases where a logfile being monitored is rotated,
the matching contents of the oldlogfile (file being
used for comparisons) will trigger an error even tho
none exist in the active monitored log.

On line 200

$DIFF $logfile $oldlog > $tempdiff

# Count the number of matching log entries we have
count=`$GREP -c "$query" $tempdiff`


I'm no developer, but it looks like this doesn't
differentiate between matches in oldlog and matches in
logfile.

----------------------------------------------------------------------

>Comment By: Mark Sparhawk (msparhawk)
Date: 2007-01-25 19:03

Message:
Logged In: YES 
user_id=1640959
Originator: YES

I tweaked line 198 to remove diff output from the RHS file (the old log)

$DIFF $logfile $oldlog | $GREP -v "^>" > $tempdiff


File Added: check_log

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1593073&group_id=29880




More information about the Devel mailing list