mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-16 20:26:06 +00:00
Merge pull request #7450 from allenxu404/release-1.13
[cherry-pick]adjust the logic for the backup_last_status metrics to stop incorrectly incrementing over time
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Adjust the logic for the backup_last_status metrics to stop incorrectly incrementing over time
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user