External integrations for borgmatic check and prune #249
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#249
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?
What I'm trying to do and why
Ensure that external integrations are successfully fired off during a start, success or failure for:
borgmatic check
borgmatic prune
Other notes / implementation ideas
Currently it appears that a hit to the
/start
and success endpoint for healthchecks is only triggered for aborgmatic create
, this should also be extended to the above borgmatic commands.Thanks for filing. Stray thought: I wonder if the determining factor on whether a borgmatic action should ping external monitoring services like Healthchecks is if the current terminal is an interactive one or not. That way, if you run the command manually (with any actions), it won't ping Healthchecks. If you run it non-interactively (with any actions), like in a cron job, it will ping Healthchecks. One downside I can see is that it may make manual testing harder.
Thoughts? I don't feel super strongly either way.
Yeah from my perspective I'm not particularly fussed either way.
The downside I can see is that if something fails and I want to re-execute a command and have it fix a potentially failed healthchecks ping I would have to do this manually, or force cron to execute the job again which might actually be more effort than it's worth.
It's probably a good thought, maybe if we are going to do that also include an opt-in flag/option which can allow us to hit the monitoring endpoint when run interactively?
Good idea. I'll play around with some of the approaches and see what appears to work well.
Related issue: #255.
Well, I went with the simpler approach for now, and just expanded the Healthchecks integration to trigger when there are any
prune
,create
, orcheck
actions. We can always revisit.Just released in borgmatic 1.4.20. Let me know how it works for you, and thanks again for the idea!