Container platforms
Questions about Kubernetes, OpenShift, Docker, and more.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I monitor a kubernetes POD restart

susmita_k
Organizer

what is the best way to get alert when a Kubernetes pod/container get restarted?

3 REPLIES 3

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

If you are monitoring Kubernetes API, you can use out-the-box workload alerts.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

We are not able to get the alert after turning on the container restart anomaly detection for workload.

dyn98007
Helper

Creating a Metric event on a  query (like the example below) , and using that to Alert based on an appropriate threshold helped in my case.

builtin:kubernetes.container.restarts:filter(and(or(in("dt.entity.cloud_application_namespace",entitySelector("type(cloud_application_namespace),entityName.equals(~"eventservice~")"))))):splitBy("dt.entity.cloud_application","dt.entity.cloud_application_instance"):sort(value(auto,descending)):limit(20)

 

Please validate the query in Data explorer. Screenshot attached

 

 

Featured Posts