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

Closed
opened 2021-10-31 12:30:41 +00:00 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.
Owner

Released in borgmatic 1.6.1!

Released in borgmatic 1.6.1!
Author

Great, thank you for the fix @witten !

Great, thank you for the fix @witten !
Author

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
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#460
No description provided.