View quota usage/available #967
Labels
No labels
blocked
breaking
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#967
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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
I want to collect statistics on my backup tasks, including quota usage & remaining quota space.
I already have "Healthchecks.io" hook configured in Borgmatic, to alert me whenever an error occurred during a backup task, or when no backup has been successfully completed for a predetermined amount of time (using the healthchecks.io service settings).
Now I also want to extract numbers from my backups, to create graphs (in Zabbix or Grafana, using the Loki hook) and to have my monitoring solution warn me before I run out of space, or whenever the backup increases in size unexpectedly.
I have seen a thread on the borgbackup issue tracker regarding viewing quota ( https://github.com/borgbackup/borg/issues/2870 ) but it is unclear to me if this information is available in Borgmatic, and if so, how to output it.
Can anyone tell me how I can get quota usage/available numbers to Loki or as JSON?
Additional link that might be useful:
Borgbackup issue #7757 Quota with a central repository server - https://github.com/borgbackup/borg/issues/7757
Steps to reproduce
No response
Actual behavior
No response
Expected behavior
No response
Other notes / implementation ideas
a huge amount of thanks for everybody contributing to this project!
borgmatic version
1.9.5
borgmatic installation method
pip install
Borg version
borg 1.4.0
Python version
Python 3.11.2
Database version (if applicable)
No response
Operating system and version
Debian GNU/Linux 12 (bookworm)
Thanks for taking the time to file this. If borgmatic were to support this, I think the first step would be get to the quota usage and limit out of Borg in a programmatic way. I see the quota usage logged upon
create, but it's just a plaintext log and doesn't appear to show up in thecreate --jsonoutput. And I don't see it all inborg infooutput, which doesn't make a whole lot of sense to me given the first ticket you linked. And it's also kind of weird because I can get the plaintext quota info out of many other commands..prune,compact, etc.Once we have the quota usage in borgmatic, the next step would be getting it somewhere useful. For Loki, do you have a sense of a good place to put that data? For instance, I see that the existing borgmatic Loki hook has a per-logging-stream "label" mechanism. Is that an appropriate place to record the quota usage data?
If you're looking to just do this yourself, the place I've found for the quota usage data is in the output of
borgmatic -v 1 create(-v 2also works). Example:Related: #617