Defining an external source file for dynamically enriching events
To create a dynamic event enrichment source file
- Create a .CSV file.
- Enter information that corresponds to each of the match and enrichment values that you plan to define in the policy.
Specify a comma-separated list of values for match and enrichment slots. You can configure up to 10000 rows or lines in the .CSV file with a size up to 4 MB.
The specified number of values specified in each row must be the same.
To create a dynamic event enrichment source file from a sample file
- Configure an event policy by specifying the basic policy details and the event selection criteria.
- Select the policy type, Advanced Enrichment.
- In the policy canvas, click Dynamic Enrichment.
- Under the Import Settings, click Download Template.
- A sample CSV file is downloaded.
- Replace the file information with appropriate match and enrichment values as described in step 2 for creating a dynamic event enrichment source file.
Example: Specify match slots and enrichment slots in the policy equal to the slots in the source file
Suppose your source file contains the following data. In the policy, the total number of match slots and enrichment slots must be equal to three because the source file contains three types of values only.
In the following table, each column corresponds to a type of slot value:
- Column A corresponds to the Status match slot.
- Column B corresponds to the Severity match slot.
- Column C corresponds to the Message enrichment slot.
Based on the following definition, while creating the dynamic enrichment policy:
- Under the Match Settings, you need to select the Status slot first, followed by the Severity slot.
- Under the Enrich Settings, you need to select the Message slot.
Also, notice the commented lines mentioned in column D. You can comment lines by preceding them with the hash symbol (#). Commented lines are not considered for matching and enriching.
Example: Source file for specifying wildcard characters and slot placeholders
Suppose your source file contains the following data.
In the following table, each column corresponds to a type of slot value:
- Column A corresponds to the Severity match slot.
- Column B corresponds to the Location match slot.
- Column C corresponds to the Owner (or the assigned user) match slot.
- Column D corresponds to the Message enrichment slot.
In the values to be used for matching, you can specify asterisk as the wildcard character. In the values to be used for enriching, you can specify slot placeholders. When the policy is applied, the slot names are replaced with appropriate slot values from the incoming event.
In the preceding table, you can see how a leading asterisk, a trailing asterisk, and an asterisk all by itself is specified in the values to be used for matching. You can also see the placeholder slots (%slotname%) specified for the values to be used for enriching.
At the time of matching, if the matching preference is set to Best Match, then the following order of preference is applied:
- exact match (for example, CRITICAL)
- starts with (for example, CRIT*)
- ends with (for example, *RITICAL)
- contains (for example, *RITIC*)
- any (for example, *)
Column E in the following table indicates how the values would be processed based on the Best Match and First Match preference:
Example: Source file for specifying regular expressions
Suppose your source files contain the sample data present in the following tables. In the following tables, each column corresponds to a type of slot value:
- Column A corresponds to the Location match slot.
- Column B corresponds to the Status match slot.
- Column C corresponds to the Owner (or the assigned user) enrichment slot.
Example source file 1
Example source file 2
Example source file 3
In the values to be used for matching, you can specify regular expressions.
In the preceding table, you can see a few examples of regular expressions (.*, [a-z], ab*c, [^a], a+, a?) that you can specify in the values to be used for matching.
At the time of matching, if the matching preference is set to Best Match, then the following order of preference is applied:
- exact match
- starts with
- ends with
- contains
- regular expressions
- any
Refer to the following table to understand how the values in the example source files would be processed based on the Best Match and First Match preference:
- Column A corresponds to values in the incoming event
- Column B corresponds to the example source file number
- Column C corresponds to the best match (row number in the example source file)
- Column D corresponds to the first match (row number in the example source file)