Skip to content

Commit

Permalink
Merge pull request vmware-tanzu#6838 from yanggangtony/fix-metrics-ba…
Browse files Browse the repository at this point in the history
…ckup_last_status

Change the default value of the velero_backup_last_status metrics.
  • Loading branch information
ywk253100 authored Sep 20, 2023
2 parents b42fb23 + cda722c commit d3e5bb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelogs/unreleased/6838-yanggangtony
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
change the metrics backup_attempt_total default value to 1.
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(0)
c.WithLabelValues(scheduleName).Add(1)
}
if c, ok := m.metrics[restoreAttemptTotal].(*prometheus.CounterVec); ok {
c.WithLabelValues(scheduleName).Add(0)
Expand Down

0 comments on commit d3e5bb7

Please sign in to comment.