avg( ) Query Function

Calculates the average for a field over a set of events. Result is returned in field named _avg.

Parameters

Name Type Required Default Description
field string Yes Field to extract a number from and calculate average over.
as string No _avg Name of output field.

field is the unnamed parameter.

Examples

Find the average bytes sent in HTTP responses.

avg(field=bytes_sent)