Allow configuring healthchecks.io ping behavior #525
Labels
No Label
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#525
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
I would like to be able to configure the pings to healthchecks.io in a more fine grained manner, specifically so that borgmatic doesn't send a
started
orfail
ping, and instead only sends thesuccess
ping if everything finished successfully.What is the use case for this? Well I want to give my backup healthchecks some leniency, as I'm running a distributed cluster where the backups are run nigthly, and some nights a client may or may not be up and running (which is not critical by any means). In this situation I configure my healthchecks to wait 3 days before switching to the
DOWN
state, since the backup will likely succeed within a few days when the client is back up again.This is currently not possible to do since borgmatic sends the
fail
ping as soon as a backup fails, which means that healthchecks.io pushes failure notifications immediately even though the situation is not critical.Essentially I would like to have some kind of simple configuration option to control this behavor, perhaps somethings along these lines:
That makes sense to me! Thanks for filing the ticket and describing your use case. I think this change would require a configuration schema change to work, as the current
heathchecks
key just has a single scalar value: the URL. But it does seem like we're going to need multiple configuration options at some point, so it might as well be for this feature.This is implemented in master now! I ended up going with a list option instead of a set of flags though. Here's how it would look to configure borgmatic to only ping for the success state:
This will be part of the next release! Thanks again for the idea.
Released in borgmatic 1.6.1!