BackupPC-users

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

2009-06-08 21:22:34
Subject: Re: [BackupPC-users] Programatically identifying errors in the log file
From: Holger Parplies <wbppc AT parplies DOT de>
To: John Rouillard <rouilj-backuppc AT renesys DOT com>
Date: Tue, 9 Jun 2009 02:21:28 +0200
Hi,

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), but this seems to
be a good indication of what BackupPC considers valid XferLOG output.

> 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.

> 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?

> Am I missing an ERROR: prefix/suffix that can be used to identify the
> true errors?

I don't see one, and I don't think the CGI code would go to so much trouble if
there were. At least some of the output is generated by the transport (and the
pre-/post-dump commands?). Your guess as to the meaning of those lines is
probably as good as BackupPC's.

Regards,
Holger

------------------------------------------------------------------------------
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>