Add option to Healthchecks hook to NOT include logs in payload data #460

Closed
opened 10 months ago by notDavid · 5 comments

What I'm trying to do and why

Using the Healthchecks hook currently includes borgmatic logs in the payload data sent to Healthchecks, which can contain (private) info about the files in the filesystem.
This is happening by default, and even when you specifically specify --monitoring-verbosity -1.

Steps to reproduce (if a bug)

  1. Run with borgmatic --verbosity -1 --syslog-verbosity 1 --monitoring-verbosity -1
  2. Make Borg trigger some error

Expected behavior (if a bug)

Please consider adding an option to NOT include logs in the payload data sent to Healthchecks.

Other notes / implementation ideas

Consider making the default behaviour to NOT include the logs. In my opinion we should not leak possible private info like this by default.

Environment

borgmatic version: [1.5.20]

borgmatic installation method: [pip3]

Borg version: [borg 1.1.16]

Python version: [Python 3.9.5]

operating system and version: [Ubuntu 21.04]

#### What I'm trying to do and why Using the Healthchecks hook currently includes borgmatic logs in the payload data sent to Healthchecks, which can contain (private) info about the files in the filesystem. This is happening by default, and even when you specifically specify `--monitoring-verbosity -1`. #### Steps to reproduce (if a bug) 1. Run with `borgmatic --verbosity -1 --syslog-verbosity 1 --monitoring-verbosity -1` 2. Make Borg trigger some error #### Expected behavior (if a bug) Please consider adding an option to NOT include logs in the payload data sent to Healthchecks. #### Other notes / implementation ideas Consider making the default behaviour to NOT include the logs. In my opinion we should not leak possible private info like this by default. #### Environment **borgmatic version:** [1.5.20] **borgmatic installation method:** [pip3] **Borg version:** [borg 1.1.16] **Python version:** [Python 3.9.5] **operating system and version:** [Ubuntu 21.04]
Owner

I apologize for the lengthy delay here. This is now implemented in master and will be part of the next release. The option looks like:

hooks:
    healthchecks:
        ping_url: https://...
        send_logs: false

I did leave the default as true though for backwards compatibility.

I apologize for the lengthy delay here. This is now implemented in master and will be part of the next release. The option looks like: ``` hooks: healthchecks: ping_url: https://... send_logs: false ``` I did leave the default as true though for backwards compatibility.
witten closed this issue 3 months ago
Owner

Released in borgmatic 1.6.1!

Released in borgmatic 1.6.1!
Poster

Great, thank you for the fix @witten !

Great, thank you for the fix @witten !
Poster

Hey @witten, fyi it's just a minor but generate-borgmatic-config with the --source and --destination feature (which is gerat by the way!) didn't correctly merge these new options into my config file;

I guess it's because of the new healthchecks key which has become like a "section" now...

Anyways only letting you know FYI :-)

Hey @witten, fyi it's just a minor but `generate-borgmatic-config` with the `--source` and `--destination` feature (which is gerat by the way!) didn't correctly merge these new options into my config file; I guess it's because of the new `healthchecks` key which has become like a "section" now... Anyways only letting you know FYI :-)
Owner

Thanks for bringing this issue to my attention! I've filed #536 to track it, and I have a fix in hand that will be part of the next release.

Thanks for bringing this issue to my attention! I've filed #536 to track it, and I have a fix in hand that will be part of the next release.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#460
Loading…
There is no content yet.