https://github.com/danihodovic/borg-exporter
Prometheus exporter for Borg backups.
https://github.com/danihodovic/borg-exporter
backups borg borgmatic exporter monitoring prometheus
Last synced: 12 months ago
JSON representation
Prometheus exporter for Borg backups.
- Host: GitHub
- URL: https://github.com/danihodovic/borg-exporter
- Owner: danihodovic
- License: mit
- Created: 2021-05-10T21:54:48.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-13T03:04:51.000Z (over 2 years ago)
- Last Synced: 2025-05-12T13:04:44.375Z (about 1 year ago)
- Topics: backups, borg, borgmatic, exporter, monitoring, prometheus
- Language: Python
- Homepage:
- Size: 183 KB
- Stars: 19
- Watchers: 2
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# borg-exporter [](https://ci.depode.com/danihodovic/borg-exporter)

A Prometheus exporter for [Borg](https://github.com/borgbackup/borg) backups.
It provides the following metrics:
Name | Description | Type
---------|-------------|----
borg_backups_total | Total number of Borg backups | Gauge
borg_last_backup_timestamp | Timestamp of the last backup | Gauge
## Requirements
borg-exporter makes use of **borgmatic** (https://github.com/witten/borgmatic) to fetch the state of backups.
The two mostly used options to install borgmatic
* From your distro's package manager
* Statically compiled python binary: https://github.com/danihodovic/borgmatic-binary
Also, the exporter assumes that borgmatic is already configured and enabled.
Refer to the official borgmatic [documentation](https://github.com/borgmatic-collective/borgmatic)
## Installation
Borg exporter runs as a Python binary managed by Systemd. It provides a command
to bootstrap into a simple systemd service.
To install the binary from Github:
```
curl -L https://github.com/danihodovic/borg-exporter/releases/download/latest/borg-exporter -o ./borg-exporter
chmod +x borg-exporter
sudo mv ./borg-exporter /usr/local/bin/
sudo borg-exporter enable-systemd
```
## Alerting rules
Alerting rules can be found [here](./borg-mixin/prometheus-alerts.yaml). By
default Prometheus sends an alert if a backup hasn't been issued in 24h5m.
## Grafana Dashboard
You can find the generated Grafana dashboard [here](./borg-mixin/dashboards_out/dashboard.json) and it can be imported directly into the Grafana UI.
It's also available in [Grafana's Dashboard Library](https://grafana.com/grafana/dashboards/14489).