Thank you for the assistance with PromQL for Pod restarts last hour by Namespace – much appreciated.
Now I’m looking to filter results by only restarts caused by an error condition. I know we have commands such as ‘kube_pod_container_status_terminated_reason’ with Reasons such as ‘Error’ and ‘OOMKilled’
Ideally I’d like to join some fields from ‘kube_pod_container_status_terminated_reason’ with ‘kube_pod_container_status_restarts_total’ . I could do this no problem if it was SQL. But, I’m still getting my brain around PromQL.
I appreciate any inputs from the community on how I can filter my pod restart total to include only Error and OOMKilled conditions.
Thanks.