Export borg information to prometheus.
- Prometheus (obviously)
- Node Exporter with textfile collector
- Borg (https://github.com/borgbackup/borg)
Copy borg_exporter
to /usr/local/bin
.
Copy borg.env
to /etc/borg
and replace your repokey and repository in it.
Copy the systemd unit to /etc/systemd/system
and run
systemctl enable prometheus-borg-exporter.timer
systemctl start prometheus-borg-exporter.timer
Alternative: Use ExecStartPost
in your borg backupt timer itself to write our the metrics.
Make sure your node exporter uses textfile
in --collectors.enabled
and add the following parameter: --collector.textfile.directory=/var/lib/node_exporter/textfile_collector
backup_total_size_dedup{job='node'}
backup_last_size_dedup{job='node'}
backup_chunks_total{job='node'}
See here for a sample grafana dashboard.