Skip to content

PMM-14153: Adding timestemp metrics for pbm backups #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions exporter/pbm_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@
}),
)

// Add backup_last_transition_ts metric
metrics = append(metrics, createPBMMetric("backup_last_transition_ts",
"Last transition timestamp of PBM backup (seconds since epoch)",
float64(backup.LastTransitionTS), map[string]string{
"opid": backup.OPID,
"status": string(backup.Status),
"name": backup.Name,
}),
)

Check warning on line 205 in exporter/pbm_collector.go

View check run for this annotation

Codecov / codecov/patch

exporter/pbm_collector.go#L196-L205

Added lines #L196 - L205 were not covered by tests
var endTime int64
switch pbmAgentStatus(backup.Status) {
case statusDone, statusCancelled, statusError, statusDown:
Expand Down