subnet() Query Function

Compute a subnet from a ipv4 field; by default emits a into a _subnet field.

Parameters

Name

Type

Required

Default

Description

bits

number

Yes

Specifies the output field, defaults to _subnet.

as

string

No

_subnet

Specifies the prefix bits to include in the subnet, e.g. 23.

field

string

Yes

Specifies the input field.

The implied parameter is field.

Examples

Compute subnet for ipAddress using 23bit prefix; emit into subnet field

humio
subnet(ipAddress, bits=23, as=subnet)