Comments (16)
OK, I think I have it figured out. "Failure" is not an official Duplicati result code, it's just created internally by dupReport whenever anything unusual happens or it sees a non-standard email while it runs. I have accounted for that now by adding a new #FAILURE# keyword you can use in the command line. I also added 2 more keywords:
#ALL# - Equivalent to #SUCCESS##WARNING##ERROR##FAILURE#
#ANYERROR# - Equivalent to #WARNING##ERROR##FAILURE#
Try the new Issue_172 branch code and see if this works for you now.
from dupreport.
Added to 3.0.6.
from dupreport.
Sounds like a great idea! Let me see ow best to incorporate it into the program.
from dupreport.
I made some changes to the code that I think will address this and uploaded it to the Issue_172 branch. The change allows you to put keywords in the title= specification in the [report] section of the .rc file. Explanation can be found in the docs for that branch under "Reporting->The [report] section->Title Keyword Substitution." Please download that code and try it out and let me know what you think. I'm still doing some testing here so let me know if this addresses your suggestion. Thanks for taking a look.
HG
from dupreport.
@wechsler42 , never mind, it's not working right. Let me play with it some more and I'll let you know when it's working.
from dupreport.
@wechsler42 , I think I have it working now. Download the latest code from the Issue_172 branch and see if it works for you.
from dupreport.
Hi there,
thanks for considering my feature suggestion.
I tried the Issue_172 branch for test runs with 1 Warning and 2 Errors on my GMX mail account. However, it did not work at all for me. Whatever I tried:
title = #ERROR# Duplicati Backup Summary Report
title = Duplicati Backup Summary Report #ERROR#
title = #ERROR##Warning# Duplicati Backup Summary Report
title = Duplicati Backup Summary Report #ERROR##Warning#
title = #ERROR##Warning#
Except of the last trial I always received "Duplicati Backup Summary Report" as subject line. For the last trial I even got an empty subject line. Perhaps you have a hint for me what I could try more?
from dupreport.
Hmmmm, that's not good.
The first thing that comes to mind is that the keywords must be in all caps. So #ERROR# should have worked but #Warning# would not.
I added some debugging statements into the code (which I should have done earlier) and uploaded a new version to Issue_172. Please download and run this new code using the -v7 option for each of the following:
title = #ERROR##WARNING# Duplicati Backup Summary Report
title = Duplicati Backup Summary Report #ERROR##WARNING#
Then upload the resulting log files (all sensitive information will be masked in the log file). Also please post the [report] section from your .rc file so I can see if there may be a problem with the specification.
Thanks.
from dupreport.
Hi there,
thanks for the guidance.
I run the trial for case:
title = #ERROR##WARNING# Duplicati Backup Summary Report
with this command: ./dupReport.py -i -v7
and this report section in my .rc file:
[report]
layout = srcdest, noactivity, lastseen
columns = source:Source, destination:Destination, date:Date, time:Time, duration:Duration, dupversion:Version, examinedFiles:Files, examinedFilesDelta:+/-, sizeOfExaminedFiles:Size, fileSizeDelta:+/-, addedFiles:Added, deletedFiles:Deleted, modifiedFiles:Modified, filesWithError:File Errors, parsedResult:Result, messages:Messages, warnings:Warnings, errors:Errors, logdata:Log Data
title = #ERROR##WARNING# Duplicati Backup Summary Report
titlebg = #FFFFFF
border = 1
padding = 5
sizedisplay = mb
repeatcolumntitles = true
suppresscolumntitles = false
durationzeroes = true
displaymessages = false
jobmessagebg = #FFFFFF
displaywarnings = true
jobwarningbg = #FFFF00
displayerrors = true
joberrorbg = #FF0000
displaylogdata = true
truncatemessage = 0
truncatewarning = 0
truncateerror = 0
truncatelogdata = 0
joblogdatabg = #FF0000
nobackupwarn = 0
nbwsubject = Backup Warning: #SOURCE##DELIMITER##DESTINATION# Backup Not Seen for #DAYS# Days
groupheadingbg = #D3D3D3
normaldays = 5
normalbg = #FFFFFF
warningdays = 20
warningbg = #FFFF00
errorbg = #FF0000
weminline = false
includeruntime = true
failedonly = False
showoffline = False
Unfortunately, there was no indication of Error or Warning in the subject line of the mail report. I hope the log file of this trial run helps to track down the issue.
from dupreport.
Hi there,
I run the second trial for case:
title = Duplicati Backup Summary Report #ERROR##WARNING#
with this command: ./dupReport.py -i -v7
and this report section in my .rc file:
[report]
layout = srcdest, noactivity, lastseen
columns = source:Source, destination:Destination, date:Date, time:Time, duration:Duration, dupversion:Version, examinedFiles:Files, examinedFilesDelta:+/-, sizeOfExaminedFiles:Size, fileSizeDelta:+/-, addedFiles:Added, deletedFiles:Deleted, modifiedFiles:Modified, filesWithError:File Errors, parsedResult:Result, messages:Messages, warnings:Warnings, errors:Errors, logdata:Log Data
title = Duplicati Backup Summary Report #ERROR##WARNING#
titlebg = #FFFFFF
border = 1
padding = 5
sizedisplay = mb
repeatcolumntitles = true
suppresscolumntitles = false
durationzeroes = true
displaymessages = false
jobmessagebg = #FFFFFF
displaywarnings = true
jobwarningbg = #FFFF00
displayerrors = true
joberrorbg = #FF0000
displaylogdata = true
truncatemessage = 0
truncatewarning = 0
truncateerror = 0
truncatelogdata = 0
joblogdatabg = #FF0000
nobackupwarn = 0
nbwsubject = Backup Warning: #SOURCE##DELIMITER##DESTINATION# Backup Not Seen for #DAYS# Days
groupheadingbg = #D3D3D3
normaldays = 5
normalbg = #FFFFFF
warningdays = 20
warningbg = #FFFF00
errorbg = #FF0000
weminline = false
includeruntime = true
failedonly = False
showoffline = False
Unfortunately, there was again no indication of Error or Warning in the subject line of the mail report. I hope the log file of this second trial run helps to track down the issue.
from dupreport.
Hi there,
I may have found a part of the solution to this issue.
If Duplicati Backup report for .... contains lines like:
"ParsedResult: Error"
"ParsedResult: Warning"
then it works fine :-)
If the Duplicati Backup report for ... only contains lines like this:
"Failed: Found 3 remote files that are not recorded in local storage, please run repair"
"2021-05-27 16:37:24 +02 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error"
then there is again no indication of Error or Warning in the subject line of the dupReport mail report.
from dupreport.
Ah, I was just reviewing the code and getting to the same conclusion when you beat me to it :-)
I'll think of a clean way to address the issue and post new code, possibly later today.
from dupreport.
Hi there,
thanks for bringing this new feature to dupReport It is working now in all my use cases with warnings, fails and errors in several Duplicati backup reports. It also works on the GMX mail server in both cases when the keyword(s) are placed at the beginning or at the end of dupReport subject line.
from dupreport.
Great to hear! Let's leave it running for a few days to see if it gives you any problems. If it's still looking good after the weekend I will promote it to the master branch.
from dupreport.
@wechsler42 , how is the change working for you? Did you have any problems over the weekend?
from dupreport.
Hi there,
it is working without any flaws.
Thanks again for implementing this feature!
from dupreport.
Related Issues (20)
- Add OS Name & Version to Log File HOT 1
- dupReport.py installer changes folder name HOT 2
- Error crash when target destination is unavailable HOT 1
- smtplib.SMTPDataError: (501, b'Syntax error - line too long') HOT 18
- Typo in [report] section HOT 1
- Change description of -verbose command line option HOT 1
- Program crashes when can't connect to SMTP server HOT 1
- Fix Typos in docs/WhatIsDupreport.md HOT 1
- Only send on failure HOT 1
- Parsing failures HOT 4
- Enabling "Less secure apps" is required for Gmail access HOT 2
- "Nonetype has no attribute groups" - dupreport crash HOT 7
- Add an Ignore option to the Source-Destination Section of the .RC file HOT 1
- Need more flexibility in defining Subject Line and S-D regex in .rc file (Was: RegEx suddenly does not match anymore) HOT 16
- dupReport is ignoring Backup Warning Threshold HOT 1
- Typo in the docs for the-b option HOT 1
- Syslog output crashes ELK Logstash 8.1.2 HOT 1
- Ignored S/D Pairs still show up in LastSeen Report
- Error in SafeConfigParser HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dupreport.