Currently I monitor presence of snapshot POD (it runs from time to time, does his job and finishes it's execution) with following PromQL query:
container_cpu_usage_seconds_total{pod=~"worker-service-snapshot-.*", container="POD"} / container_cpu_usage_seconds_total{pod=~"worker-service-snapshot-.*", container="POD"}
So it just returns 1 when cpu metric was recorded.
In grafana it looks like this (added comments what I want to achieve):
My label format is {{container}} right now.
How I can display (over time series or in legend) duration for how long POD was up and running?
