Explore
Metrics Aggregations
Gauge
4 min
a gauge shows the current value of something at a specific point in time it doesn’t care about history or totals; it simply reflects “what is the value right now?” and it can go up or down every time it is read the table below shows raw data points of a sample gauge metric collected at various timestamps series 12 05 12 07 12 09 12 11 12 13 12 15 12 17 12 18 12 19 cpu=cpu1, state=idle 0 80 0 80 0 80 0 90 0 90 0 75 0 75 0 75 0 75 cpu=cpu1, state=user 0 15 0 15 0 15 0 05 0 05 0 20 0 15 0 20 0 10 cpu=cpu1, state=wait 0 05 0 05 0 05 0 05 0 05 0 05 0 10 0 05 0 15 cpu=cpu2, state=idle 0 70 0 75 0 75 0 80 0 80 0 70 0 70 0 70 0 70 cpu=cpu2, state=user 0 25 0 15 0 15 0 10 0 05 0 20 0 15 0 20 0 10 cpu=cpu2, state=wait 0 05 0 10 0 10 0 10 0 15 0 10 0 10 0 10 0 20 temporal aggregation (aggregation within the same time series) if you specify an interval (e g , 300 seconds), the data points are grouped into multiple buckets within the same time series based on the given interval it is recommended to leave this field set to auto so the system can determine the appropriate interval based on the time range, unless there is a specific need to adjust it you can then select an available aggregation function to apply to all data points within each interval for each series for example, if you select avg for temporal aggregation, the table below shows the calculation within each interval example interval 300s, aggregation avg, start timestamp 12 05, end timestamp 12 25 series 12 05 12 07 12 09 12 11 12 13 12 15 12 17 12 18 12 19 cpu=cpu1, state=idle avg(0 80, 0 80, 0 80) = 0 80 avg(0 90, 0 90, 0 75) = 0 85 avg(0 75, 0 75, 0 75) = 0 75 cpu=cpu1, state=user avg(0 15, 0 15, 0 15) = 0 15 avg(0 05, 0 05, 0 20) = 0 10 avg(0 15, 0 20, 0 10) = 0 15 cpu=cpu1, state=wait avg(0 05, 0 05, 0 05) = 0 05 ag(0 05, 0 05, 0 05) = 0 05 avg(0 10, 0 05, 0 15) = 0 10 cpu=cpu2, state=idle avg(0 70, 0 75, 0 75) = 0 73 avg(0 80, 0 80, 0 70) = 0 77 avg(0 70, 0 70, 0 70) = 0 70 cpu=cpu2, state=user avg(0 25, 0 15, 0 15) = 0 18 avg(0 10, 0 05, 0 20) = 0 12 avg(0 15, 0 20, 0 10) = 0 15 cpu=cpu2, state=wait avg(0 05, 0 10, 0 10) = 0 08 avg(0 10, 0 15, 0 10) = 0 12 avg(0 10, 0 10, 0 20) = 0 13 spatial aggregation (aggregation across multiple time series) spatial aggregation aggregates values across multiple time series example aggregation sum, no grouping for example, if you choose sum for spatial aggregation without any grouping, the aggregation will be applied across all available series series 12 05 12 07 12 09 12 11 12 13 12 15 12 17 12 18 12 19 cpu=cpu1, state=idle sum(0 80, 0 15, 0 05, 0 73, 0 18, 0 08) = 1 99 sum(0 85, 0 10, 0 05, 0 77, 0 12, 0 12) = 2 01 sum(0 75, 0 15, 0 10, 0 70, 0 15, 0 13) = 1 98 cpu=cpu1, state=user cpu=cpu1, state=wait cpu=cpu2, state=idle cpu=cpu2, state=user cpu=cpu2, state=wait groupby applies to spatial aggregation for example, if user choose sum with groupby (cpu) series 12 05 12 07 12 09 12 11 12 13 12 15 12 17 12 18 12 19 cpu=cpu1, state=idle sum (0 80, 0 15, 0 05) sum (0 85, 0 10, 0 05) sum (075, 0 15, 0 10) cpu=cpu1, state=user cpu=cpu1, state=wait cpu=cpu2, state=idle sum (0 73,0 18,0 08) sum (0 77, 0 12, 0 12) sum (0 70, 0 15, 0 13) cpu=cpu2, state=user cpu=cpu2, state=wait the final result will look like series 12 05 12 10 12 15 cpu=cpu1 sum (0 80, 0 15, 0 05) sum (0 85, 0 10, 0 05) sum (075, 0 15, 0 10)