Grafana & Prometheus Important Queries for Monitoring Kubernetes Pods 2022

 


1. Current Memory Usage of Pods

(max(container_memory_working_set_bytes{pod!="",container!="POD"}) by (pod))/(1024*1024)

2. Current CPU usage of Pods

(max (rate (container_cpu_usage_seconds_total{pod!="",container!="POD"}[1m])) by (pod))*1000

3. Pod Restart Rate

increase((kube_pod_container_status_restarts_total{pod!="",container!="POD"}[5m]))

4. OOMKilled Containers

max(kube_pod_container_status_last_terminated_reason{reason="OOMKilled",pod!="",container!="POD"}) by (pod)

5. Error Status of Pod

max(kube_pod_container_status_last_terminated_reason{reason="Error",pod!="",container!="POD"}) by (pod)




Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment