K8s - How to check if service is running in the pod - need to create alerts

Could someone please help me how to create alerts to verify if the service is running in kubernetes pods ? Its java microservice application running as docker in the K8s

Hi @upendar.devulapalli this would depend on how it’s reporting to us, is the data just being collected by the Kubernetes Integration? Would you mind sending on a permalink to the service in the UI and I can take a look? :slight_smile:

Thanks, I’m asking in general , if the java based application container running in the kubernetes , how to setup alerts to see if the service is running , sometimes POD shows running state but when we hit the service its not responding

I think a Synthetics check is the best approach for this scenario.

Monitoring that the pod is running is not sufficient, nor is confirming that the Java process is running within the container; you want to ensure that the application is responding to requests. You can configure a Synthetics check to send requests to the application, and verify that it is responding as expected.

Thanks for the quick response
I have setup an alert with below condition for the namespace in which there are total 10 services and each service has 2 pods , that means total 20 pods are running in that namespace

Issue : 10 pods are not running state , so got alert with incident [146753687] opened but the email notification with alert shows only one of the pods is listed in the email notification stating the POD is not in running state, if anyone look at the email they think only one pod is not running but actually there are 10 pods are not running out of 20 pods .
so when I did open the INC ticket then I see all those 10 pods are mapped to same INC which is expected

But how can we get email notification listing all those pods not running state ? since I did mention the condition as namespace , not every pod name explicitly since I cant setup for all 100 pods … instead good to include just the namespace

Please suggest how to get email alert listing all POD names which are not running instead of listing just one pod name ?

Alert condition - k8spodsample
Is Ready < 1 at least once in 5 minutes on 'k8s:kube-c1********