Skip to content

Enrich

Enrich (enrich)

Look up values in a CSV or Sqlite database and add matching fields.

Enrichment json

Minimal example

actions:
- enrich:
lookup:
csv: ""
JSON
{
"actions": [
{
"enrich": {
"lookup": {
"csv": ""
}
}
}
]
}

Contents

Fields

FieldTypeRequiredDescription
lookupLookupCSV file or Sqlite file containing enrichment information.
descriptionstringdescribe this step.
conditionlua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()
dynamicboolean (bool)The lookup file may not exist at job creation time.
addAddA field value to add to the event.
event-fieldsmap (object)Add multiple fields to a single event based on a single match, providing a default.
matchMatch[]Match event values against lookup column values.
suppress-warningsboolean (bool)Suppress warnings generated by this action.

Schema

Lookup Options

OptionNameTypeDescription
csvCsvstringThe source is a CSV file.
Examples: /path/to/file, c:\users\joe\data\file.txt
sqliteSqliteobjectThe source is a Sqlite database.
worker-databaseWorker DatabaseobjectThe source is a worker-managed database.

Lookup - Sqlite Fields

FieldTypeRequiredDescription
pathpath (string)Path to the database.
Examples: /path/to/file, c:\users\joe\data\file.txt
tablestringTable to use for lookup.

Lookup - Worker Database Fields

FieldTypeRequiredDescription
tablestring

Add Fields

FieldTypeRequiredDescription
event-fieldfield (string)Field name to be added to the event.
Examples: data_field
lookup-fieldfield (string)Field (CSV header) to lookup data to be place in event-field.
Examples: data_field
default-valuemap (object)YAML formatted default value if the event is empty.
Examples: data_field

Match Fields

FieldTypeRequiredDescription
typeTypeThe type of the match.
Allowed values: str, num, cidr, ip, num-range, num-list, str-list, none
event-fieldfield (string)field containing the value to lookup.
Examples: data_field
lookup-fieldfield (string)name of CSV or database field to be compared.
Examples: data_field

Match - Type Options

ValueDescription
strplain text match
numnumerical match
cidrCIDR (e.g. 192.150.0.1/24)
ipIP address
num-rangeA range of numbers
num-lista list of numbers
str-listA list of text values
noneNone