New to Stash? Please start here.
Stash has native support for monitoring via Prometheus.
Stash operator exposes Prometheus native monitoring data via /metrics
endpoint on :56790
port. You can setup a CoreOS Prometheus ServiceMonitor using stash-operator
service.
Since backup operations are run as cron jobs, Stash can use Prometheus Pushgateway cache metrics for backup operation. The installation scripts for Stash operator deploys a Prometheus Pushgateway as a sidecar container. You can configure a Prometheus server to scrape this Pushgateway via stash-operator
service on port :56789
. Backup operations send the following metrics to this Pushgateway:
restic_session_success{job="<restic.namespace>-<restic.name>", app="<workload>"}
: Indicates if session was successfully completedrestic_session_fail{job="<restic.namespace>-<restic.name>", app="<workload>"}
: Indicates if session failedrestic_session_duration_seconds_total{job="<restic.namespace>-<restic.name>", app="<workload>"}
: Total seconds taken to complete restic sessionrestic_session_duration_seconds{job="<restic.namespace>-<restic.name>", app="<workload>", filegroup="dir1", op="backup|forget"}
: Total seconds taken to complete restic sessionThe dashboard can be downloaded directly from the repo or from Grafana.com.
You can import the dashboard JSON file or through Grafana.com import by ID 4198
.
A demo on what the dashboard shows, can be found here: Stash - Backup Overview - Raintank.io Snapshot.