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 |
|---|---|---|---|
| Key | key | Required. The key whose value contains a number to parse. | none |
| Regex | regex | Required. The regular expression for extracting numbers from the value of Key. | [+-]?([0-9]+([.][0-9]*)?|[.][0-9]+) |
| Numeric base | base | Required. The base system of the number stored in Key. As part of the parsing process, this rule converts each number from its original base system to decimal. | 10 |
| 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 |
Examples
Using the parse number process rule lets you extract numeric data from a string, which makes it possible to perform math operations on that data.Decimal
For example, given these sample logs:price, the Regex value
[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+), and the Numeric base value 10 returns
the following result:
price key from a string to a number, and
discarded non-numeric characters and leading zeroes contained in the original string.
Binary
You can also the Numeric base setting to parse numbers in other base formats, like binary. For example, given these sample logs:node, the Regex value
[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+), and the Numeric base value 2 returns
the following result:
node key from a string to a number,
then converted that number from binary to decimal.