VMware Cloud Community
itayms
Contributor
Contributor

VM Uptime Super Metric

  Hi,

i was try to make a super metric that change the OS Uptime From seconds to days.

the formula looks like that :

sumN(Virtual Machine: System|OS Uptime,5)/86400


i put her on a virtual machine package that run on all of the virtual machines.


but when i check the data i got  no data.


please help me.




Reply
0 Kudos
13 Replies
mark_j
Virtuoso
Virtuoso

Depends how you applying the pkg to the VM, but try this.  No sum necessarily (will see if needed from "array" error).. no ,5 (not referring to other levels in hierarchy)

(Virtual Machine: System|OS Uptime)/86400


This type of thing is a common SM.

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
itayms
Contributor
Contributor

Thanks Mark,

but i get this error :

OS Uptime.JPG

Reply
0 Kudos
mark_j
Virtuoso
Virtuoso

NP - pass it through a function to convert it from number to array just like you do for all of your other SMs for that situation. The result will depend on how you apply the pkg to the resources..

sum(Virtual Machine: System|OS Uptime)/86400

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
itayms
Contributor
Contributor

Hi Mark,

stiil not work, i attached the screenshots:

Uptime Vcenter.JPG

Uptime Super Metric.JPG

Reply
0 Kudos
mark_j
Virtuoso
Virtuoso

Test the formula using the visual supermetric function I gave you with the sum function, and observe a span of at least 7 days to see the linear line. Obviously you need to select a virtual machine resource instance for the test. Usually you can identify+correct any errors in syntax pretty quickly for a given situation using the SM editor + visualize SM graph.

Just to check - you do know how to use the visual supermetric feature, correct? You've done this before?

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
lakshya32
Enthusiast
Enthusiast

Hi Mark

Welcome to the communities.

I am having same problem & not aware of visual matric

Could you please help me out .

  

"Look for your choices, pick the best one."
Reply
0 Kudos
mark_j
Virtuoso
Virtuoso

It looks like for this guy you're best off using $This instead of $RK## for this example. See the attached screenshot of this SM in the visualize supermetric window:

UptimeVM.png

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
itayms
Contributor
Contributor

yes Mark, i was create a lot of SM.

this is the furmola that i insert, i was put her on a virtual machine package:

OS Uptime.JPG

Reply
0 Kudos
mark_j
Virtuoso
Virtuoso

Please see my previous reply from yesterday afternoon indicating you'll want to use $This instead of the $RK## you're currently using.

Observe the screenshot I attached to see the formula and visualization of the SM.

Thanks

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
itayms
Contributor
Contributor

Capture.JPG

Reply
0 Kudos
mark_j
Virtuoso
Virtuoso

Your screenshot indicates you haven't changed your formula as per my above recommendations, hence the continued failure of the SM.

Use "$This" instead of the "$RK16". Did you look at my formula/screenshot and notice that it differs from yours?

Thanks

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos
itayms
Contributor
Contributor

so now it's work but this will be a static super metric, i need this to be a dynamic for all my virtual machines

Capture.JPG

Reply
0 Kudos
mark_j
Virtuoso
Virtuoso

You did as I suggested and used $This, but then you went and changed the attribute ref to a metric ref (why?).

*Note: Attribute = relative reference, metric = absolute reference.

I used your earlier screenshot and did it for you - I was trying to help you figure out the final solution on your own, but this thread is getting too long:

sum($This:A862)/86400

If you find this or any other answer useful please mark the answer as correct or helpful.
Reply
0 Kudos