Merged Configs and Healthchecks (monitoring) #1338

Closed
opened 2026-08-05 15:29:30 +00:00 by sshaikh · 3 comments

What I'm trying to do and why

I'm attempting to use the merging facility to override some options on a per repo basis (say there are two repos).

Previously, the Healthchecks feature would run on the file as a whole, so one entry covering the the start, log and error state of anything that happens.

If I split out the config to a common include, I expect the healthcheck to process twice. Since this is not being overridden, this means these will go to the same healthcheck endpoint. In the worst case, that means if the second repo operation succeeds where the first failed, then the failure might be obscured.

If that's correct, is the expectation to use a separate HC endpoint per file?

Steps to reproduce

include/common.yaml:

#etc
healthchecks:
    # Healthchecks ping URL or UUID to notify when a backup
    # begins, ends, errors, or to send only logs.
    ping_url: https://hc-ping.com/xxx
#etc

repo1.yaml:

<<: !include include/common.yaml
repositories:
  - path: foo
     label: bar

repo2.yaml:

<<: !include include/common.yaml
repositories:
  - path: foo2
     label: bar2

borgmatic version

1.9.14

borgmatic installation method

pip

### What I'm trying to do and why I'm attempting to use the merging facility to override some options on a per repo basis (say there are two repos). Previously, the Healthchecks feature would run on the file as a whole, so one entry covering the the start, log and error state of anything that happens. If I split out the config to a common include, I expect the healthcheck to process twice. Since this is not being overridden, this means these will go to the same healthcheck endpoint. In the worst case, that means if the second repo operation succeeds where the first failed, then the failure might be obscured. If that's correct, is the expectation to use a separate HC endpoint per file? ### Steps to reproduce include/common.yaml: ``` #etc healthchecks: # Healthchecks ping URL or UUID to notify when a backup # begins, ends, errors, or to send only logs. ping_url: https://hc-ping.com/xxx #etc ``` repo1.yaml: ``` <<: !include include/common.yaml repositories: - path: foo label: bar ``` repo2.yaml: ``` <<: !include include/common.yaml repositories: - path: foo2 label: bar2 ``` ### borgmatic version 1.9.14 ### borgmatic installation method pip
Owner

I think everything you said here is correct. Monitoring hooks currently run at the configuration file level—so start fires before all repositories in a particular configuration file run, and finish fires after them. So yes, a separate Healthchecks endpoint per configuration file makes sense!

I think everything you said here is correct. Monitoring hooks currently run at the configuration file level—so `start` fires before all repositories in a particular configuration file run, and `finish` fires after them. So yes, a separate Healthchecks endpoint per configuration file makes sense!
Author

Thanks. I've requested a feature to discuss functionality related to this.

Thanks. I've requested a feature to discuss functionality related to this.
Owner

Sounds good! (For reference: #1339)

Sounds good! (For reference: #1339)
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#1338
No description provided.