The extract keys/values processing rule uses a regular expression to search for key/value pairs inside a string, then creates a structured object to store those key/value pairs. Additionally, the resulting output always includes a string of the original unstructured data. The resulting output includes both the original JSON data and a string of comma-separated values assigned to a key you specify.Documentation Index
Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
Use this file to discover all available pages before exploring further.
Configuration parameters
Use the parameters in this section to configure the . The Telemetry Pipeline web interface uses the items in the Name column to describe these parameters. Pipeline configuration files use the items in the Key column as YAML keys.| Name | Key | Description | Default |
|---|---|---|---|
| Source key | src | Required. The key whose value contains key/value pairs to extract. | none |
| Destination key | dst | Required. The key of the object to store your structured key/value pairs. If you specify the name of an existing key, the original value of the key is overwritten. | none |
| Regex | regex | Required. The regular expression for extracting key/value pairs from the value of Source key. This expression must have two capture groups: the result of the first capture group becomes the name of a key, and the result of the second capture group becomes that key’s value. | none |
| Regex engine | regexEngine | Required. The engine to parse your regular expression. Accepted values: GNU, Oniguruma, PCRE2, POSIX, TRE. | PCRE2 |
| Comment | comment | A custom note or description of the rule’s function. This text is displayed next to the rule’s name in the Actions list in the processing rules interface. | none |
Example
Using the extract keys/values rule lets you extract embedded data from a string and turn it into parsable key/value pairs. You can then use these key/value pairs in other processing rules or for general storage and analysis. For example, given the following sample website log data:log, the Destination key
value extracted, the Regex value (\w+):(\w+), and the Regex
engine value PCRE2 returns the following result:
log key and
stored those key/value pairs in a new structured object named extracted.

