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

ParameterTypeRequiredDefault ValueDescription
asstringoptional[a]_subnet Specifies the name of the output field.
bitsnumberrequired  Specifies the prefix bits to include in the subnet, e.g. 23.
field[b]stringrequired  Specifies the input field.

[a] Optional parameters use their default value unless explicitly set.

[b] The argument name field can be omitted.

Hide omitted argument names for this function

Show omitted argument names for this function

subnet() Examples

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

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