Add option to disable Healthchecks ping on soft failure #1031
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#1031
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?
What I'd like to do and why
In #842 a change was made to ping Healtchecks/monitoring with "finish" in the case of soft failure.
That makes sense in some cases, but not always.
I have two config files : one backups to a cloud service, and one to a USB disk. In the config for the USB disk, i use a
before_backuphook to run findmnt and generate a soft failure (exit 75) if the USB disk is not mounted.With borgmatic 1.9.13, it sends a ping to Healthchecks so the backup status is OK on Healthchecks, even though the backup didn't run.
I would like to be able to configure an option to make it revert to the old logic : only send the start ping to Healthchecks, no end ping, so Healthchecks will warn me if no backups finished successfully within the specified timeframe.
I guess I could achieve this with the
backup_everythinghook, but I can't because I still need borgmatic to run my other config file (cloud backup).PS : the
before: configurationhook, planned for borgmatic 2, should solve my problem. I don't know if it is going to be released soon, but this feature request will probably be obsolete with borgmatic 2.Other notes / implementation ideas
No response
Thanks for filing this. borgmatic 2 should be released within the next few weeks, and at minimum it is planned to be the next borgmatic release. So that should hopefully satisfy this need. But just to make sure: How do you envision the new
before: configurationcommand hook solving this need? Is the ideas that you'd move yourfindmntsoft failure call to thebefore: configurationlevel?Yes, if I move the
findmntsoft failure call to thebefore: configurationlevel, the whole config for the USB disk will not run, so Healthchecks will get no ping for it, which is right : no backup happened.My other config file (cloud backup) will run as usual and ping its own Healthchecks URL, so I will still know if it happened and completed successfully or not.
I tried the
backup_everythinghook with 1.9.13, its logic would be good for me if I had only the USB backup config, but I can't use it because it also skips my cloud backup. I guess this will be solved by the newbefore: configurationhook.Gotcha. Yes, looking at the code in main,
before: configurationdoes respect the soft failure exit code and therefore won't ping any monitoring hooks like Healthchecks (for that configuration file) in that situation. So given that I think this satisfies your need, I'll close this ticket for now. But please let me know if it turns out the new hook does not meet your needs in practice. Thanks!