prometheus-borg-exporter/README.md

40 lines
1.1 KiB
Markdown
Raw Normal View History

2024-04-01 17:02:29 +02:00
# Prometheus Borg(Backup) exporter
Simple [Prometheus](https://prometheus.io/) exporter for [BorgBackup](https://www.borgbackup.org/).
Rewritten in go from https://code.recycled.cloud/RecycledCloud/prometheus-borgbackup-exporter.
It has been rewritten mainly to enable building a static binary but also to support ipv6.
Additional features have also been added like `last_archive_time`.
## Building
To build, you'll need at least the [go toolchain](https://go.dev/doc/install) installed.
On Ubuntu you can generally have the latest version by running:
```sh
snap install go --classic
```
Then run:
```sh
go build
```
Note this executable is dynamically linked and not stripped.
### Static executable
To build a static executable, you'll need `make` installed. You can then simply run:
```sh
make
```
## Useful links:
- [Writing a go exporter](https://prometheus.io/docs/guides/go-application/)
- [Writing (Prometheus) exporters guidelines](https://prometheus.io/docs/instrumenting/writing_exporters/)
- [Prometheus's `client_golang` library](https://github.com/prometheus/client_golang)