# Need some guidence related to Kubernetes monitoring

**URL:** <https://community.dynatrace.com/t/need-some-guidence-related-to-kubernetes-monitoring/44314>\
**Category:** Container platforms\
**Tags:** dynatrace-managed, kubernetes\
**Created:** [February 26, 2024, 3:51pm UTC](https://community.dynatrace.com/t/need-some-guidence-related-to-kubernetes-monitoring/44314 "2024-02-26T15:51:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tek\_nayak](https://avatars.discourse-cdn.com/v4/letter/t/e68b1a/32.png) [@Tek\_nayak](https://community.dynatrace.com/u/Tek_nayak)\
**Post date:** [February 26, 2024, 3:51pm UTC](https://community.dynatrace.com/t/need-some-guidence-related-to-kubernetes-monitoring/44314/1 "2024-02-26T15:51:10Z")

</div>

Hi Team,&nbsp;  
I need the logic where i can&nbsp;&nbsp;create an alert in Dynatrace for when the pod count of any workload within a specific namespace is zero,. So, Need some guidance on the query

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [February 26, 2024, 4:47pm UTC](https://community.dynatrace.com/t/need-some-guidence-related-to-kubernetes-monitoring/44314/2 "2024-02-26T16:47:51Z")

</div>

You can use the builtin metric “builtin:kubernetes.pods”, [Built-in classic metrics — Dynatrace Docs](https://docs.dynatrace.com/docs/observe-and-explore/metrics/built-in-metrics#other-kubernetes-metrics)

Then use the Metric Event to create a rule based on your needs, filtering by namespace dimension,

> **[Metric events](https://docs.dynatrace.com/docs/dynatrace-intelligence/anomaly-detection-classic/metric-events)**
>
> Learn about metric events in Dynatrace

 ![image (21).png](https://global.discourse-cdn.com/dynatrace/original/3X/6/0/60e225d5b6432237ca644743d9a10e7508cfc6a6.png)

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [February 26, 2024, 8:44pm UTC](https://community.dynatrace.com/t/need-some-guidence-related-to-kubernetes-monitoring/44314/3 "2024-02-26T20:44:11Z")

</div>

Hi&nbsp;[@Tek\_nayak](https://community.dynatrace.com/user/72678),

I do not know what is the purpose of your request to count the pods. Sorry if I missunderstood you. Maybe you can use this in built anomaly detection rule.

 ![Mizs_0-1708980157949.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/336e02c65449102c49a9e770b4cc3217a403822e.png)

Best regards,

Mizső

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [February 26, 2024, 8:46pm UTC](https://community.dynatrace.com/t/need-some-guidence-related-to-kubernetes-monitoring/44314/4 "2024-02-26T20:46:44Z")

</div>

That’s even smarter!!

---

<div class="post-metadata">

**Author:** ![Tek\_nayak](https://avatars.discourse-cdn.com/v4/letter/t/e68b1a/32.png) [@Tek\_nayak](https://community.dynatrace.com/u/Tek_nayak)\
**Post date:** [February 26, 2024, 8:51pm UTC](https://community.dynatrace.com/t/need-some-guidence-related-to-kubernetes-monitoring/44314/5 "2024-02-26T20:51:43Z")

</div>

The goal is to trigger the alert when any of the pods becomes zero for any of the workload with in&nbsp; the name space …I have the same alert rule in grafana …I need to migrate same logic over dynatrace

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [February 27, 2024, 8:42am UTC](https://community.dynatrace.com/t/need-some-guidence-related-to-kubernetes-monitoring/44314/6 "2024-02-27T08:42:30Z")

</div>

Abraham Maslow’s law:&nbsp;“If the only tool you have is a hammer, you tend to see every problem as a nail.”&nbsp;🙂  
Don’t try to replicate the logic if you have different tools.

Try to understand what pain point you are trying to solve and use what you have in Dynatrace.
