PagerDuty, et al.: Add actual error message on failed backup #409
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#409
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When a backup fails, the PagerDuty incident only includes configuration filename, hostname and server time. For debugging, it would be really helpful to have the actual error message as well.
Environment
borgmatic version: 1.5.13
borgmatic installation method: Homebrew
Borg version: borg 1.1.16
Python version: Python 3.9.4
operating system and version: macOS
I apologize for the lengthy delay here. Yes, this would be helpful. One of the other monitoring hooks does something similar by slurping up any borgmatic logs (including the error message) and passing everything on to the monitoring service. So in theory that code could be repurposed for the PagerDuty hook.
syslogoutput #675This is implemented in main and will be part of the next release! I only implemented this for PagerDuty for now, although it'd be possible to expand it to other monitoring hooks as needed.
Documentation will be online here shortly: https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/#pagerduty-hook
The summary is that sending (truncated) logs to PagerDuty is enabled by default and can be disabled via a new
send_logsoption.Released in borgmatic 1.9.14!