VMware Cloud Community
Mackintire
Contributor
Contributor

Clarification of supermetric syntax

sum(${this, metric=OnlineCapacityAnalytics|capacityRemainingPercentage})-40) >= 0 ? 1:0

 

I want this to read as:

 

If Capacity Remaining Percentage minus 40 is greater than or equal to zero

THEN show me a value of “1”

Else show me value of “0”

Does it read that way to you?    It doesn't seem to be working correctly.

0 Kudos
4 Replies
sxnxr
Commander
Commander

Apart from missing a bracket it looks correct to me. Here is what it shows me and seems to be working as expected

pastedImage_0.png

0 Kudos
Mackintire
Contributor
Contributor

It's still not working for me.  Can you cut and paste your working example?  I expect it is something silly like an extra space or lack of messing up the supermetric.

 

Thank you in advance.

0 Kudos
sxnxr
Commander
Commander

Same as yours but with the missing bracket after sum added

sum((${this, metric=OnlineCapacityAnalytics|capacityRemainingPercentage})-40) >= 0 ? 1:0

When you say it is not working what do you mean. Also what object are you running this against?

0 Kudos
Mackintire
Contributor
Contributor

I figured it out, it was a policy metric/adapter relationship permission type issue.  I originally had it tied to all adapters since I didn't have a specific adapter type defined.
0 Kudos