Average data in Single Stat View chart

I need some help understanding how to use the Single Stat View chart.

My goal doesn't seem to be too complex but the Single Stat View is giving me results I don't understand.

I want to have an average CPU utilization chart. Just showing the average CPU usage during the selected time frame.

There is exactly this in one of the example dashboard of the Welcome Tour, using sample data.

In below example I'm also working with the sample data and a query very close to the example chart from the Tour.

Chart 1:

This is a stacked area with a legend, showing mean and median.

ts(~sample.cpu.usage.percentage, source=app-5)

Chart 2:

The Single Stat View

avg(ts(~sample.cpu.usage.percentage, source=app-5))

Both charts are summarized by average. Depending on the chosen timeframe, the results vary. Sometimes the calculated average might be about right. On other timeframes the average clearly is off.

Here are two examples:



The values still are close to the actual average. With our actual data I have seen huge differences. Due to scheduled tasks our CPU usage is flapping between very high and very low values. The calculated average then is more close to the max or min values in some timeframes:




I guess what I want is to display the mean value in the Single Stat Chart. How would I do that?



0 Kudos
1 Reply
VMware Employee
VMware Employee

Do you want the mean, or the median?    You could do a moving median with a sufficiently large windows. See the docs:

mmedian(timeWindow, expression)

Wavefront Query Language Quick Reference | Wavefront

0 Kudos