No description
Find a file
2018-09-05 17:00:25 +02:00
borg_exporter.rc Best file naming. Improve code. Add makefile. Add metrics borg_extract_exit_code and bork_hours_from_last_backup. Update doc 2018-09-05 17:00:25 +02:00
borg_exporter.sh Best file naming. Improve code. Add makefile. Add metrics borg_extract_exit_code and bork_hours_from_last_backup. Update doc 2018-09-05 17:00:25 +02:00
LICENSE add apache 2.0 license 2018-03-08 15:58:03 +01:00
Makefile Best file naming. Improve code. Add makefile. Add metrics borg_extract_exit_code and bork_hours_from_last_backup. Update doc 2018-09-05 17:00:25 +02:00
prometheus-borg-exporter.service Best file naming. Improve code. Add makefile. Add metrics borg_extract_exit_code and bork_hours_from_last_backup. Update doc 2018-09-05 17:00:25 +02:00
prometheus-borg-exporter.timer first commit 2016-04-23 22:31:00 +02:00
README.md Best file naming. Improve code. Add makefile. Add metrics borg_extract_exit_code and bork_hours_from_last_backup. Update doc 2018-09-05 17:00:25 +02:00
VERSION version: bump to 0.1.1+git 2017-05-22 10:07:12 +02:00

Borg exporter

Export borg information to prometheus.

Dependencies

  • Dateutils
  • Prometheus (obviously)
  • Node Exporter with textfile collector
  • Borg

Install

With the Makfile

For convenience, you can install this exporter with the command line make install or follow the process described in the next paragraph.

Manually

Copy borg_exporter.sh 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.

Configure your node exporter

Make sure your node exporter uses textfile in --collectors.enabled and add the following parameter: --collector.textfile.directory=/var/lib/node_exporter/textfile_collector

Exported metrics

borg_extract_exit_code
bork_hours_from_last_backup
bork_count
bork_files
bork_chunks_unique
bork_chunks_total
bork_last_size
bork_last_size_compressed
bork_last_size_dedup
bork_total_size
bork_total_size_compressed
bork_total_size_dedup

Grafana dashboard

See here for a sample grafana dashboard.