VMware Cloud Community
AshRobKP
Contributor
Contributor

Need to report null value in supermetric, not "0"

Hello all, 

 

I manage a VDI offering and we have a "small", "medium", and "large" VDI offering, depending on user needs. I am setting up super metrics that report the average CPU and Memory on a per user basis, not VM basis due to non-persistence.  The metrics below show a custom metric we created (teal), CPU % (pink), and Mem % (purple). The metrics generated while the user is logged on are perfect, however, when the user is logged off, the metrics report a value of zero "0". 

Custom Metric, CPU %, and Mem %Custom Metric, CPU %, and Mem %

 

 

This is breaking our "view"/report because we are trying to get an average because the average is including the 0 values when the users are not logged in. So non working hours are draging down the value. The picture below shows the skewed data from the user above. The CPU and Memory usage that are reported are drastically lower that the average during an active user session. 

SkewedUserDataSkewedUserData

 

 

I have seen some metrics that report NULL values when there is nothing to report. For instance, Session|User Desktop Duration Last Interval reports null (instead of 0) when the user is not logged in. 

 

Is there any way to have my supermetrics report a null value instead of 0 when the user is not logged in?

Here are the existing metrics as I have them: 

 

  • sum({Virtual MachineCPU|Workload, depth=2})
    • this gathers the CPU workload % metric for the user, no matter what VM they are allocated. 
  • sum({Virtual MachineMemory|Workload, depth=2})
    • this gathers the Memory workload % metric for the user, no matter what VM they are allocated. 
  • sum({VDI Desktop SessionSession|Session Duration, depth=2}) > 0 ?sum({Virtual MachineMemory|Workload, depth=2,where=">60"})||sum({Virtual MachineCPU|Workload, depth=2,where=">75"}) ? 100 : -100 :0
    • this sets a value of 100 or -100 to tell us if a user is over or under utilizing their assigned size of VM. 

 

 

 

Labels (3)
Reply
0 Kudos
1 Reply
bfkmnemonic
Enthusiast
Enthusiast

Did you ever find an answer for this?

I kind of have the same issue.

Reply
0 Kudos