geoip
Enrich events with geographic information using a MaxMind GeoLite2-City database at path. The IP address is extracted from the event using the ip JS function. Geo data is written to target (default: geo). Events are always emitted downstream, whether enrichment succeeds or fails.
Config
Required:
path: Path to MaxMind GeoLite2-City.mmdbdatabase fileip: JS function(event) => string— returns the IP address string to look up
Optional:
target: Field name to write geo data into (default:geo)
Output fields
When enrichment succeeds, the following fields are written to event[target]:
Fields are omitted if the database does not have data for that IP.
Example
pipeline:
geoip:
config:
path: /path/to/GeoLite2-City.mmdb
ip: "event => event.client?.ip ?? event.source?.ip ?? event.ip"
target: geo