BackupPC-users

Re: [BackupPC-users] Programatically identifying errors in the log file

2009-06-09 00:57:20
Subject: Re: [BackupPC-users] Programatically identifying errors in the log file
From: John Rouillard <rouilj-backuppc AT renesys DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Tue, 9 Jun 2009 04:49:40 +0000
On Tue, Jun 09, 2009 at 02:21:28AM +0200, Holger Parplies wrote:
> Hi,

Hello Holger:
 
> John Rouillard wrote on 2009-06-08 21:27:11 +0000 [[BackupPC-users]
> Programatically identifying errors in the log file]:
> > 
> > I am modifying a plugin for nagios to scan the backup logs and verify
> > that the backups completed successfully. [...] I need
> > to count the errors while filtering out certain known (and acceptable)
> > classes of errors.
> > 
> > Are there rules for identifying true errors in the XferLOG.XXX.z
> > files?
> 
> well, there's the code in BackupPC::CGI::View (sub action, search for
> "XferErr") that extracts the errors for output in the web interface ("Errors"
> link under "Xfer Error Summary" on a host page). You'd need to add skipping
> parts of the startup section that are not filtered out here (maybe explicitly
> exclude lines you want to ignore rather than use a range),

Yeah explicitly excluding a sequence of lines was my fallback. It's
just a pain to have to map out and filter the sequence when you don't
know what can be there as valid output.

> but this seems to
> be a good indication of what BackupPC considers valid XferLOG output.

Yeah I looked at it a while ago and basically it seemed to be any line
that started with non-whitespace in column 1. I'll have another look
to see if it's changed.
 
> > I suppose I could generate a list of all the valid startup lines, but I
> > am not sure if some of the phrases I use to match valid lines (e.g.):
> > 
> >   incr backup ...
> > 
> > could also start error lines.
> 
> What's more, each new BackupPC version could introduce new error messages
> which could turn out to match your expressions.

Also true.
 
> > Is there a better way of identifying true errors in the log files?
> 
> Can't you use the error count values from the 'backups' file?

Nope, because the error count values are counting things that are
acceptable errors in our environment: i.e. the files deleted while
backuppc is running.  So I have 49 errors reported for one of the
backups. It's 49 temporary files removed from under backuppc, so the
backup really completed fine as far as we are concerned. It is missing
some files, but that is an acceptable loss. I can't just exclude the
log files as I do want as many of them as it can get, but if some get
removed while backuppc is running that is ok.

However if other files are getting removed while backuppc is running
then there is a problem that I have to address, so commenting out the
code that reports removed files isn't really a solution (and is also
not something that would be an upstream compatible patch AFAIAC).

Thanks for your comments.

-- 
                                -- rouilj

John Rouillard       System Administrator
Renesys Corporation  603-244-9084 (cell)  603-643-9300 x 111

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>