https://github.com/jelly/prometheus-borg-exporter
Prometheus Borg Exporter
https://github.com/jelly/prometheus-borg-exporter
borg prometheus python
Last synced: about 1 month ago
JSON representation
Prometheus Borg Exporter
- Host: GitHub
- URL: https://github.com/jelly/prometheus-borg-exporter
- Owner: jelly
- License: mit
- Created: 2019-07-07T13:20:52.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-09T17:01:27.000Z (almost 7 years ago)
- Last Synced: 2025-04-06T01:43:55.517Z (about 1 year ago)
- Topics: borg, prometheus, python
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prometheus Borg Exporter
A very simple Borg exporter for Prometheus. This exporter is mostly useful for
getting the days since the last backup was made and the sizes of the backups in
total.
# Dependencies
* python
* prometheus_client
# Usage
Run the exporter
python prometheus-borg-exporter.py
The default port is 9099, visit metrics [http://localhost:9099/ http://localhost:9099/].
# Configuration
The backup directory's can be configured in borg.yml with the backups
directories in the 'dirs' list. The metrics use the basename of the directory
as the "backup host".
# Example Promethues AlertManager rule
```yaml
- name: backup
interval: 60s
rules:
- alert: backup
expr: borg_last_modified > 5
for: 20m
labels:
severity: warning
annotations:
description: 'host {{ $labels.instance }} has outdated backups'
summary: '{{ $labels.instance }} backups are {{ $value }} days old'
```
# Not implemented
There is no support for decrypting the backups.