Skip to content

Commit 7c34685

Browse files
theTibiJiriCtvrtka
andauthored
PMM-14153: Adding timestemp metrics for pbm backups (#1108)
Co-authored-by: Jiří Čtvrtka <[email protected]>
1 parent 7c0fc12 commit 7c34685

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

exporter/pbm_collector.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,16 @@ func (p *pbmCollector) pbmBackupsMetrics(ctx context.Context, pbmClient *sdk.Cli
193193
}),
194194
)
195195

196+
// Add backup_last_transition_ts metric
197+
metrics = append(metrics, createPBMMetric("backup_last_transition_ts",
198+
"Last transition timestamp of PBM backup (seconds since epoch)",
199+
float64(backup.LastTransitionTS), map[string]string{
200+
"opid": backup.OPID,
201+
"status": string(backup.Status),
202+
"name": backup.Name,
203+
}),
204+
)
205+
196206
var endTime int64
197207
switch pbmAgentStatus(backup.Status) {
198208
case statusDone, statusCancelled, statusError, statusDown:

0 commit comments

Comments
 (0)