cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to calculate pod uptime

VENKY1544
Observer

Hi 

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

VENKY1544_0-1695115661748.png

 

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

4 REPLIES 4

danielD
Dynatrace Helper
Dynatrace Helper

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, 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.

natanael_mendes
Champion

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-quo...

 

Feel free to ask if you got any doubts

Dynatrace Professional Certified

Mizső
DynaMight Guru
DynaMight Guru

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ő 

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

Ana_Kuzmenchuk
Community Team
Community Team

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

The only constant is change. Finding ways for great things to happen!

Featured Posts