mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-06 21:36:30 +00:00
Fix the metrics backup_last_status not report right value when the schedule down unexpectation.
Signed-off-by: yanggang <gang.yang@daocloud.io>
This commit is contained in:
1
changelogs/unreleased/6838-yanggangtony
Normal file
1
changelogs/unreleased/6838-yanggangtony
Normal file
@@ -0,0 +1 @@
|
||||
change the metrics backup_attempt_total default value to 1.
|
||||
@@ -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(0)
|
||||
c.WithLabelValues(scheduleName).Add(1)
|
||||
}
|
||||
if c, ok := m.metrics[restoreAttemptTotal].(*prometheus.CounterVec); ok {
|
||||
c.WithLabelValues(scheduleName).Add(0)
|
||||
|
||||
Reference in New Issue
Block a user