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

ParameterTypeRequiredDefaultDescription
asstringfalse_subnetSpecifies the prefix bits to include in the subnet, e.g. 23.
bitsnumbertrue Specifies the output field, defaults to _subnet.
fieldstringtrue Specifies the input field. [a]

[a] When you provide only one parameter, the implied parameter is field

Examples

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

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