VMware Cloud Community
RRock
Enthusiast
Enthusiast
Jump to solution

Super Metric Help

I'm trying to represent the disk read/write split at a cluster level in a percentage (i.e. 30% writes and 70% reads). I'm not getting the formatting correct because I keep getting the following warning:

Formula expression is not valid. Cannot convert number array to number.

I'm trying to add Disk|Reads per second + Disk|Writes per second and divide Disk|Reads per second into it to get the percentage:

sum(This Resource: Disk|Reads per second)/(This Resource: Disk|Reads per second+This Resource: Disk|Writes per second)*100


What am I doing wrong?


Thanks!

Tags (2)
1 Solution

Accepted Solutions
mark_j
Virtuoso
Virtuoso
Jump to solution

The attributes you're referring in the fomula are array type. Run them through another formula that only yields a single value, such as sum or avg.

So you're $this:metric needs to become avg ($this:metric)

In case you're wondering,  its a common situation.


Mark

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

View solution in original post

0 Kudos
2 Replies
mark_j
Virtuoso
Virtuoso
Jump to solution

The attributes you're referring in the fomula are array type. Run them through another formula that only yields a single value, such as sum or avg.

So you're $this:metric needs to become avg ($this:metric)

In case you're wondering,  its a common situation.


Mark

If you find this or any other answer useful please mark the answer as correct or helpful.
0 Kudos
RRock
Enthusiast
Enthusiast
Jump to solution

Thank you, that worked: (avg(This Resource: Disk|Reads per second)/(avg(This Resource: Disk|Reads per second)+avg(This Resource: Disk|Writes per second)))*100