# Alert on the count of running pods per node

**URL:** <https://discuss.elastic.co/t/alert-on-the-count-of-running-pods-per-node/318752>\
**Category:** Elastic Observability\
**Tags:** elastic-stack-alerting\
**Created:** [November 11, 2022, 3:48pm UTC](https://discuss.elastic.co/t/alert-on-the-count-of-running-pods-per-node/318752 "2022-11-11T15:48:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![EDzhelyov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/edzhelyov/32/113054_2.png) [@EDzhelyov](https://discuss.elastic.co/u/EDzhelyov)\
**Post date:** [November 11, 2022, 3:48pm UTC](https://discuss.elastic.co/t/alert-on-the-count-of-running-pods-per-node/318752/1 "2022-11-11T15:48:06Z")

</div>

We have the following Prometheus alert:

```auto
count (
            kube_pod_info
            and on (pod, namespace, monitor) (
              kube_pod_status_phase{job="kube-state-metrics", phase="Running"} > 0
            )
          ) by (node, monitor) > 240

```

That will alert when the number of running pods on a node is above 240.

Is it possible to achieve the same in Kibana?

I tried with

 ![Screenshot 2022-11-11 at 16.53.03](https://us1.discourse-cdn.com/elastic/original/3X/0/4/0451e573898ae7bac4ccad132dfbf22b598fa2bb.jpeg)  
but the problem is that the number of documents highly depends on the scrape interval and the aggregation interval and I can't reliably count the last scrape, while in Prometheus you can take the latest vector and count by it.

I tried to use the `kubernetes.node.pod.allocatable.total` and `kubernetes.node.pod.capacity.total` hoping these metrics can provide the information, but they both show the same value of 250 which is the specified capacity on the node and I couldn't find the number of currently running pods.

Do you have a way in Elastic Alerts that can allow us to implement alarms similar to the Prometheus one in the beginning?
