Skip to main content

avg Metrics Operator

The avg operator calculates the average of all matching time series. If grouping is specified, it calculates the average for each group.

Syntax

avg [by FIELD [, FIELD, ...]]

Examples

Average value across all time series 

This query returns the average value of the RequestCount metric across matching time series.  

Namespace=AWS/ApplicationELB metric=RequestCount Statistic=Sum AvailabilityZone=* Region=* TargetGroup=* | avg 

  avg1.png

Average by one field

This query returns the average value of the RequestCount metric by one field—TargetGroup—across all matching time series, for the selected query range. Each line on the chart corresponds to a TargetGroup.

Namespace=AWS/ApplicationELB metric=RequestCount Statistic=Sum AvailabilityZone=* Region=* TargetGroup=* | avg by TargetGroup

 

Average by two fields

Returns the average value of the metric by two fields—TargetGroup and _sourceName—across all matching time series, for the selected query range. Each line on the chart corresponds to a _resourceName-TargetGroup combination.

Namespace=AWS/ApplicationELB metric=RequestCount Statistic=Sum AvailabilityZone=* Region=* TargetGroup=* | avg by TargetGroup, _sourceName
Status
Legal
Privacy Statement
Terms of Use

Copyright © 2024 by Sumo Logic, Inc.