https://github.com/josh/restic-exporter
Prometheus exporter for Restic metrics
https://github.com/josh/restic-exporter
prometheus prometheus-exporter restic
Last synced: 5 months ago
JSON representation
Prometheus exporter for Restic metrics
- Host: GitHub
- URL: https://github.com/josh/restic-exporter
- Owner: josh
- License: mit
- Created: 2026-02-13T21:37:46.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-02-14T02:42:49.000Z (5 months ago)
- Last Synced: 2026-02-14T04:39:51.826Z (5 months ago)
- Topics: prometheus, prometheus-exporter, restic
- Language: Go
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# restic-exporter
Prometheus exporter for Restic repositories.
## Requirements
- Go 1.25+ (for building)
- `restic` available in `PATH`
## Usage
```
./restic-exporter [flags]
```
Metrics are served at `http://[::]:9183/metrics` by default.
## Configuration
Configuration comes from environment variables and can be overridden by CLI flags.
### Required environment variables
- `RESTIC_REPOSITORY`
- One of:
- `RESTIC_PASSWORD`
- `RESTIC_PASSWORD_FILE`
- `RESTIC_PASSWORD_COMMAND`
### Optional environment variables
- `REFRESH_INTERVAL` (seconds, default: `3600`)
- `LISTEN_ADDRESS` (default: `[::]`)
- `LISTEN_PORT` (default: `9183`)
- `INCLUDE_PATHS` (default: `false`)
### CLI flags
- `-verbose` (enable debug logging)
- `-refresh-interval` (seconds between metric refreshes)
- `-listen-address`
- `-listen-port`
- `-include-paths`
Global stats and locks are always collected and no longer have disable flags.
## systemd
There is a sample unit file under `systemd/` you can adapt for your environment.
Example:
```
[Unit]
Description=restic-exporter
After=network-online.target
[Service]
ExecStart=/usr/local/bin/restic-exporter -listen-address="[::]" -listen-port=9183
Environment=RESTIC_REPOSITORY=...
Environment=RESTIC_PASSWORD=...
Restart=on-failure
[Install]
WantedBy=multi-user.target
```
## Grafana dashboards (upstream)
```
https://github.com/ngosang/restic-exporter/tree/main/grafana
```