nmanm0305
Enthusiast
Enthusiast

OS Uptime Metric

There is a VM metric named 'OS Uptime'. It provides the amount of time that a VM has been powered-on, but its default unit is seconds. And there isnt an option to change it. Id like it to be days....so I tried creating a super metric.

The problem is that the super metric never shows up as an available metric (I have others that work okay).

Is anyone successfully using the 'OS Uptime' metric within a super metric to see the up time as anything other than seconds (the default)?

pastedImage_0.pngpastedImage_3.pngpastedImage_4.png

sum(((${this, metric=sys|osUptime_latest, depth=1}/60)/60)/24)

pastedImage_5.png

pastedImage_6.png

0 Kudos
4 Replies
RickVerstegen
Expert
Expert

Did you enable the Super Metric in the policy? And applied the super metric to object type virtual machine?

Blog: https://rickverstegen84.wordpress.com/ Twitter: https://twitter.com/verstegenrick
0 Kudos
abugeja
Hot Shot
Hot Shot

did you end up getting this working as im wanting to report on the same?

0 Kudos
sxnxr
Commander
Commander

works fine for me. I just changed the SM slightly. (I only created it today)

pastedImage_1.png

floor(sum(${this, metric=sys|osUptime_latest})/86400)

I floored it to round down the number and / by the number of seconds in a day. Only thing of note is i have only tested it on 8.0 but sure it will work on any version that has the up time metric

0 Kudos
abugeja
Hot Shot
Hot Shot

I ended up not using a super metric and adding an expression with (current)/86400 which then converts it to Days. Working now