From 9a239a68b9c85265b599611ea494c76cb189c023 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Mon, 7 Nov 2022 21:01:07 -0800 Subject: [PATCH] Fix metric help and register failure count metric --- metrics.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metrics.go b/metrics.go index 0fb6f68..4ba15b6 100644 --- a/metrics.go +++ b/metrics.go @@ -38,7 +38,7 @@ func InitMetrics() *ResticMetrics { SnapshotCurrentCount: prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "restic_snapshot_current_total", - Help: "time it took for the last job run", + Help: "number of current snapshots", Namespace: "", Subsystem: "", ConstLabels: nil, @@ -58,6 +58,7 @@ func InitMetrics() *ResticMetrics { } prometheus.MustRegister(metrics.JobStartTime) + prometheus.MustRegister(metrics.JobFailureCount) prometheus.MustRegister(metrics.SnapshotCurrentCount) prometheus.MustRegister(metrics.SnapshotLatestTime)