Skip to main content

Lookup Processor

Overview

Advanced CSV-based lookup processor supporting multiple match types, duplicate handling, fallback fields, caching, and enrichment across logs, metrics, and traces.

Supported types: Logs · Metrics · Traces

General Settings

ParameterTypeDefault ValueRequiredDescription
csvstringnoneYesPath to the CSV file containing lookup data.
cache_sizeinteger0NoMaximum number of lookup results to cache for performance.
refresh_intervalstring1mNoHow often to reload the CSV file.

Lookup Mappings

Array of field mapping configurations.

ParameterTypeDefault ValueRequiredDescription
source_fieldstringnoneYesField name to use for lookup matching.
source_contextstringnoneYesLocation of the source field in the data (body, attributes, resource.attributes).
target_fieldsobjectnoneYesMapping of CSV columns to target fields.
target_contextstringnoneYesLocation where enriched fields will be added (body, attributes, resource.attributes).
match_typestringexactNoType of matching to perform against source field (supported values: exact, regex, cidr).
case_sensitivebooleanfalseNoWhether to perform case-sensitive matching.
duplicate_handlingstringoverwriteNoHow to handle duplicate matches (supported values: error, overwrite, skip, append_unique).
fallback_fieldsarray[]NoAdditional source fields to try if primary lookup fails.
default_valuesobject{}NoDefault values to use when no match is found.

Example Configuration

{
"csv": "/path/to/lookup.csv", // required
"cache_size": 1000,
"refresh_interval": "1m", // default: "1m"

"mappings": [
// required, min 1
{
"source_field": "ip",
"source_context": "attributes", // required
"target_fields": {
"owner": "owner",
"department": "dept",
},
"target_context": "attributes", // required
"match_type": "cidr", // default: "exact"
"case_sensitive": false,
"duplicate_handling": "overwrite", // default: "overwrite"
"fallback_fields": ["fallback_ip"],
"default_values": {
"owner": "unknown",
},
},
],
}