cidrlookup
Use the cidrlookup command to enrich events by matching an
IP field against CIDR ranges in a lookup table.
Syntax
| cidrlookuptableipField[AScidrColumn] OUTPUT|OUTPUTNEWlookupField[ASeventField] [, ...]
The command uses the following arguments:
-
– The name of the lookup table containing CIDR ranges.table -
– The event field containing the IP address to match.ipField -
AS(Optional) – The column in the lookup table that contains the CIDR ranges.cidrColumn -
OUTPUT|OUTPUTNEW– UseOUTPUTto overwrite existing fields, orOUTPUTNEWto fill only empty fields. -
– One or more fields from the lookup table to add to the event.lookupField
Example
The following query enriches events with region, owner, and datacenter from a network lookup table.
fields @timestamp, srcAddr | cidrlookup net_table srcAddr OUTPUT region, owner, datacenter