shannonEntropy() Query Function

Calculates a entropy measure from a string of characters.

Parameters

Name

Type

Required

Default

Description

field

string

Yes

The name of the input field.

as

string

No

_shannonentropy

The output name of the field to set.

The implied parameter is field.

Examples

Shows how to calculate a shannon entropy value for the string in a field. An input event with the field “dns_name” with the value “example.com” results in the field “entropy” having the rounded value 3.095795.

humio
entropy := shannonEntropy(dns_name)