# Get pending pods by pod names

**URL:** <https://community.dynatrace.com/t/get-pending-pods-by-pod-names/40773>\
**Category:** Dashboarding\
**Tags:** dynatrace-managed, data-explorer\
**Created:** [July 19, 2023, 12:59pm UTC](https://community.dynatrace.com/t/get-pending-pods-by-pod-names/40773 "2023-07-19T12:59:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AK](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ak/32/164_2.png) [@AK](https://community.dynatrace.com/u/AK)\
**Post date:** [July 19, 2023, 12:59pm UTC](https://community.dynatrace.com/t/get-pending-pods-by-pod-names/40773/1 "2023-07-19T12:59:46Z")

</div>

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,

```markup
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&nbsp;_**Kubernetes: Pod count (by workload)**_

Regards,

AK

---

<div class="post-metadata">

**Author:** ![AK](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ak/32/164_2.png) [@AK](https://community.dynatrace.com/u/AK)\
**Post date:** [July 20, 2023, 12:12pm UTC](https://community.dynatrace.com/t/get-pending-pods-by-pod-names/40773/2 "2023-07-20T12:12:19Z")

</div>

Hi Team,

Is it possible? Can someone help.

Regards,

AK

---

<div class="post-metadata">

**Author:** ![Kenny\_Gillette](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kenny_gillette/32/20170_2.png) [@Kenny\_Gillette](https://community.dynatrace.com/u/Kenny_Gillette)\
**Post date:** [July 20, 2023, 2:22pm UTC](https://community.dynatrace.com/t/get-pending-pods-by-pod-names/40773/3 "2023-07-20T14:22:59Z")

</div>

Something like this?

 ![Kenny_Gillette_0-1689862954038.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d848f569d8e18c00c19c47e7aca456c6b7ef5ffd.png)

Here is code:

builtin:kubernetes.pods:filter(and(or(eq(pod\_status,Pending)))):splitBy(“k8s.pod.name”):sort(value(auto,descending)):limit(20)
