Hi guys,
i have a restic rest-server running and working with following config.
- prometheus
- private-repos
- append-only
Additionally i generated a .htpasswd file and added the user ‘someuser’ to it.
On the remote server - which i want to backup - i have created a resticenv.sh with this content:
#!/usr/bin/bash
export RESTIC_REPOSITORY="rest:http://restserver.mydomain.com:12345/someuser/myrepo"
export RESTIC_PASSWORD="verysecurepass"
export RESTIC_REST_USERNAME=someuser
export RESTIC_REST_PASSWORD=securepass
export RESTIC_CACHE_DIR="/data/restic_cache/restic"
After i ran
source resticenv.sh
i was able to create a repository with:
restic init
So far so good.
i can run backups and check them with restic snapshots
so now i want to monitor the backups with Prometheus so a added a
The Prometheus entry:
- job_name: 'restic_backup'
metrics_path: '????'
basic_auth:
username: someuser
password: "securepass"
static_configs:
- targets: ["restserver.mydomain.com:12345"]
What is the right path for the metrics?
From the docs i assumed it was /metrics
or because of the ‘private-repos’ flag: /someuser/metrics
So i tried those and these are the results:
/metrics -> 401 Unauthorized
/someuser -> 401 Unauthorized
/someuser/metrics -> 404 Not Found
/someuser/myrepo -> 404 Not Found
/someuser/myrepo/metrics -> 404 Not Found
i also tried with curl
curl -v -X GET -u someuser:securepass http://restserver.mydomain.com:12345{URLS_ABOVE}
What should be the right URL?
My Restic_Rest Password looks something like this: ApyKsyns4CiJgMVZOjHaLp@2R
.
Could the “@” be a problem?
I tried changing the password to something simple (of course restarted the restic server) - but the responses are the same.