Skip to main content
This information is for Chronosphere Telemetry Pipeline, which is a standalone product separate from Chronosphere Observability Platform.
The parse number processing rule uses a regular expression to transform a key’s value from a string to a number.

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.

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:
A processing rule with the Key value price, the Regex value [+-]?([0-9]+([.][0-9]*)?|[.][0-9]+), and the Numeric base value 10 returns the following result:
This rule transformed the value of each 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:
A processing rule with the Key value node, the Regex value [+-]?([0-9]+([.][0-9]*)?|[.][0-9]+), and the Numeric base value 2 returns the following result:
This rule transformed the value of each node key from a string to a number, then converted that number from binary to decimal.