Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Calculates the average of the values in a specified column in the search query results.

Syntax

avg <column_name>

Required Arguments

...

Description

For each event in the search query results that has the specified column_name with a numeric value, add the value to the cumulative sum, and when you have reached the last event, divide the cumulative sum by the number of events to get the average.

Examples

Example 1:   ...* in log.access | avg Bytes Sent 

 Returns the average value of the column Bytes Sent in the events from access log.