cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get pending pods by pod names

AK
Pro

Hello Folks,

How do we get pending pods by pod name.

I'm trying to configure the metric events. Goal is to get pod who's status is in pending state and filter by namespaces.

Below is the query I'm using however, I don't get any result,

builtin:kubernetes.pods:filter(and(or(in("dt.entity.cloud_application_namespace",entitySelector("type(cloud_application_namespace),entityName.equals(~"namespace~")"))),or(eq(pod_phase,Pending)))):splitBy("k8.pod.name"):sort(value(auto,descending))

 Metric used is Kubernetes: Pod count (by workload)

Regards,

AK

2 REPLIES 2

AK
Pro

Hi Team,

Is it possible? Can someone help.

Regards,

AK

Kenny_Gillette
DynaMight Leader
DynaMight Leader

Something like this?

Kenny_Gillette_0-1689862954038.png

Here is code:

builtin:kubernetes.pods:filter(and(or(eq(pod_status,Pending)))):splitBy("k8s.pod.name"):sort(value(auto,descending)):limit(20)

Dynatrace Certified Professional

Featured Posts