Skip to content

danihodovic/borg-exporter

Repository files navigation

borg-exporter Build Status

Dashboard

A Prometheus exporter for 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

Also, the exporter assumes that borgmatic is already configured and enabled.

Refer to the official borgmatic documentation

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. 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 and it can be imported directly into the Grafana UI.

It's also available in Grafana's Dashboard Library.