Skip to content

Commit

Permalink
Adjust the logic for the backup_last_status metric to stop incorrectl…
Browse files Browse the repository at this point in the history
…y incrementing over time

Signed-off-by: allenxu404 <[email protected]>
  • Loading branch information
allenxu404 committed Feb 20, 2024
1 parent d45b313 commit 10909b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ func (m *ServerMetrics) InitSchedule(scheduleName string) {
c.WithLabelValues(scheduleName).Add(0)
}
if c, ok := m.metrics[backupLastStatus].(*prometheus.GaugeVec); ok {
c.WithLabelValues(scheduleName).Add(1)
c.WithLabelValues(scheduleName).Set(float64(1))
}
if c, ok := m.metrics[restoreAttemptTotal].(*prometheus.CounterVec); ok {
c.WithLabelValues(scheduleName).Add(0)
Expand Down

0 comments on commit 10909b6

Please sign in to comment.