# how to calculate pod uptime

**URL:** <https://community.dynatrace.com/t/how-to-calculate-pod-uptime/41688>\
**Category:** Container platforms\
**Tags:** kubernetes\
**Created:** [September 19, 2023, 9:29am UTC](https://community.dynatrace.com/t/how-to-calculate-pod-uptime/41688 "2023-09-19T09:29:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![VENKY1544](https://avatars.discourse-cdn.com/v4/letter/v/c37758/32.png) [@VENKY1544](https://community.dynatrace.com/u/VENKY1544)\
**Post date:** [September 19, 2023, 9:29am UTC](https://community.dynatrace.com/t/how-to-calculate-pod-uptime/41688/1 "2023-09-19T09:29:48Z")

</div>

Hi

I can see the age column related to pods under kubernetes overview of the node

 ![VENKY1544_0-1695115661748.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/3/1369a03e9ef479403d4f9f22103c3a88f725a217.png)

how can i use it to display in dashboard panel to show the uptime of the pods

---

<div class="post-metadata">

**Author:** ![danielD](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@danielD](https://community.dynatrace.com/u/danielD)\
**Post date:** [September 19, 2023, 9:10pm UTC](https://community.dynatrace.com/t/how-to-calculate-pod-uptime/41688/2 "2023-09-19T21:10:10Z")

</div>

Hello,

In order to get that information dashboarded you would have to be able to get a metric to display in data explorer. Please try looking through the kubernetes built in metrics found here, [Built-in classic metrics — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/all-metrics#kubernetes).

If there is not a metric for “pod uptime” it may have to be a custom metric, or you can post this in the Ideas channel for suggesting the creation of such a metric.

---

<div class="post-metadata">

**Author:** ![natanael\_mendes](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/natanael_mendes/32/15264_2.png) [@natanael\_mendes](https://community.dynatrace.com/u/natanael_mendes)\
**Post date:** [September 19, 2023, 9:27pm UTC](https://community.dynatrace.com/t/how-to-calculate-pod-uptime/41688/3 "2023-09-19T21:27:02Z")

</div>

i think that if you use&nbsp;builtin:host.uptime maybe works, but i dont know for sure.

You can try create metrics to do this. anyway take a look of this documentation page

[https://community.dynatrace.com/t5/Container-platforms/Assigning-a-hostgroup-to-an-OpenShift-pod-quot-host-quot/td-p/117397](https://community.dynatrace.com/topic/117397)

Feel free to ask if you got any doubts

---

<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:** [September 19, 2023, 9:55pm UTC](https://community.dynatrace.com/t/how-to-calculate-pod-uptime/41688/4 "2023-09-19T21:55:17Z")

</div>

Hi&nbsp;[@VENKY1544](https://community.dynatrace.com/user/55769),

AFAIK there is not an OOTB solution. Maybe you can play with Environment APIv2 Monitored entities:

GET / entities provide a list of entities with fist seen and last seen attribute, you can filter only for pods by type(“CLOUD\_APPLICATION\_INSTANCE”)

or

GET / entities / {entityId} but in this case you should know the individual entity ids.

I hope it helps to start thinking.

Best regards,

Mizső

---

<div class="post-metadata">

**Author:** ![Ana.Kuzmenchuk](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@Ana.Kuzmenchuk](https://community.dynatrace.com/u/Ana.Kuzmenchuk)\
**Post date:** [October 4, 2023, 1:44pm UTC](https://community.dynatrace.com/t/how-to-calculate-pod-uptime/41688/5 "2023-10-04T13:44:33Z")

</div>

hi&nbsp;[@VENKY1544](https://community.dynatrace.com/user/55769)&nbsp;, did any of the comments above help you? You can accept any of them as solutions if they work 🙂
