Abdullah Toyoglu
03/06/2024, 7:37 AMChitransh Gupta
03/06/2024, 11:18 PMavg_over_time(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[5m]) > 0
Can you try this query ?
This will calculate the average number of restarts over the last 5 minutes and check if the average is greater than 0 for the kubernetes container restart metrics.Abdullah Toyoglu
03/07/2024, 6:50 AMChitransh Gupta
03/08/2024, 11:28 AMrate(k8s_container_restarts{k8s_namespace_name="abc"}[5m]) > 0
This will give you the number of restarts over just the last 5 minutes without averaging. Can you try this ?Abdullah Toyoglu
03/08/2024, 12:03 PMChitransh Gupta
03/08/2024, 2:33 PMAbdullah Toyoglu
03/08/2024, 3:07 PM