Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Sorts events by the given expressions.

sort [-]expr...

Sorts events by the given expressions, putting all null values at the end.

If multiple expressions are specified, the sorting happens lexicographically, that is: Later expressions are only considered if all previous expressions evaluate to equal values.

This operator performs a stable sort (preserves relative ordering when all expressions evaluate to the same value).

An expression that is evaluated for each event. Normally, events are sorted in ascending order. If the expression starts with -, descending order is used instead. In both cases, null is put last.

sort timestamp
sort -timestamp

Sort by a field src_ip and, in case of matching values, sort by dest_ip:

sort src_ip, dest_ip

Sort by the field src_ip in ascending order and by the field dest_ip in descending order.

sort src_ip, -dest_ip

Last updated: