Important
This function is considered experimental and under active development and should not be used in production.
The function must be enabled using the feature flag
ArrayFunctions
. See
Enabling/Disabling Features.
Computes a value from all events and array elements of the specified array.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
array | string | true | The prefix of the array in Humio, for example for events with fields 'incidents[0], incidents[1], ...' this would be 'incidents'. [a] | |
function | string | true | The function to be applied to each element. | |
var | string | true | Array element field name to use in the function. | |
Syntactically, the function is similar to:
logscale
split(array) | function(array)
but is more efficient.
Examples
Compute the maximum value of all values in an array named
values
in all events:
logscale
array:reduceAll(values, var=x, function=max(x))
Group by array values and the non-array field type
logscale
array:reduceAll(values, var=x, function=groupby([type, x]))