how to calculate pod uptime

Hi

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

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

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.

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.

i think that if you use 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

Feel free to ask if you got any doubts

Hi @VENKY1544,

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ő

hi @VENKY1544 , did any of the comments above help you? You can accept any of them as solutions if they work :slightly_smiling_face: