PagerDuty, et al.: Add actual error message on failed backup #409

Closed
opened 2021-04-09 14:15:19 +00:00 by Ghost · 3 comments

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

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
Owner

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.

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

This 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_logs option.

This 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_logs` option.
Owner

Released in borgmatic 1.9.14!

Released in borgmatic 1.9.14!
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
borgmatic-collective/borgmatic#409
No description provided.