This information is for Chronosphere Telemetry Pipeline, which is a standalone product separate from Chronosphere Observability Platform.
- Adding a new field to each log for easier debugging and troubleshooting.
- Redacting sensitive values to preserve user privacy.
- Removing unnecessary fields to improve the signal-to-noise ratio of your data.
- Converting data from one format to another.
- Turning unstructured data into structured data.
- Aggregating logs into metrics to reduce data volume while retaining key insights.
Overview
Each built-in processing rule transforms data in a specific way. You can combine multiple processing rules to create complex transformation logic suited for your telemetry data and storage format. Processing rules are applied at the plugin level, and each plugin can have multiple associated processing rules. Any rules associated with a source plugin are applied after the data from that plugin has been parsed by a file-based parser, if applicable. Any rules associated with a destination plugin are applied before the data leaves your pipeline.Format
Processing rules are run one at a time, from top to bottom. If you add multiple processing rules to the same pipeline for the same telemetry type, the output from your first rule becomes the input for your second rule, the output from your second rule becomes the input for your third rule, and so on. Most processing rules are compatible with most data formats. Processing rules are also designed to skip any incompatible records or records that can’t be processed, which means you can create rules even if they only apply to a subset of your data. For example, you can apply a broad rule to remove a certain field from your logs even if some logs that travel through your pipeline don’t contain that field.Telemetry types
Requires Core Operator version 3.1.0 or later and pipeline agent version 24.7.3 or later.Processing rules support logs, metrics, and traces. You can create processing rules for multiple telemetry types within the same pipeline, but each processing rule is applied only to its specified telemetry type. For example, if you create a search/replace value processing rule for metrics, this rule won’t affect any logs or traces that pass through your pipeline, even if those logs or traces contain a matching key.
When raw log data passes through at least one processing rule, the data
receives a new
log field for each event. This log field lets you treat each event
as a single unit of data.Structured log data such as JSON doesn’t receive a log field
because you can already break structured data into discrete events.Regex engines
Requires Telemetry Pipeline version 2.9.0 or later.Some processing rules, like block records and rename keys, accept regular expressions. For most of these rules, you can specify one of the following engines to parse your rule:
Record accessor syntax
If your raw data is in JSON format, you can use record accessor syntax to extract nested fields within a larger JSON object. To extract a nested field inside a standard object, use the following syntax:$kubernetes.pod_name resolves to mypod-0, and the expression
$kubernetes.labels[0] resolves to "app": "myapp".
If the name of a field or parent object contains periods, wrap the name in
quotes. For example, to access the field
k8s.pod.uid inside the object
attributes, use the expression $attributes."k8s.pod.uid".Add processing rules to your pipeline
- Sign in to the Telemetry Pipeline web interface.
- Open the project that contains the pipeline to which you want to add processing rules.
- Navigate to Core Instances, then select the pipeline to which you want to add processing rules.
- Click Edit.
- Click the node in the middle of the configuration diagram.
- In the dialog that appears, select an option from the Telemetry type tab.
- Click Add New Rule to open the processing rules menu.
- Select a processing rule from the available list.
- Configure the available settings for that processing rule, and then click Apply.
- Optional: Repeat steps 5 through 8 to add additional processing rules. If you add multiple rules, you can drag them to change the order in which they run.
- Optional: Add test input and then click Preview Output to preview the output of your processing rules.
- Click Apply Processing Rules to finalize your processing rules, and then click Save and Deploy to save your pipeline settings.
Use the toggle next to a processing rule to enable or disable that rule.
Use pipeline logs as preview input data
You can use the Input and Output panes in the processing rules builder to preview the effects of your processing rules. When you edit processing rules for most pipelines, or when you use the processing rules playground, the Input pane displays sample logs by default. However, when you edit certain eligible pipelines, the Input pane automatically fetches the latest logs from that pipeline. You can also manually fetch logs from eligible pipelines to use as preview input data in the processing rules playground or when editing any other pipelines.To be an eligible preview input source, a pipeline must be active and must include
the Standard output
destination plugin. This plugin is necessary because Chronosphere can’t access
the telemetry data that passes through your pipelines without it.
Save and load templates
To create a template from your current processing rule settings, click Export to save a JSON template file to your device. You can also click Save to save your template within the Telemetry Pipeline web interface, which makes that template available to any other users in your current project. To load an existing template, click Import and select a JSON template file stored on your device, or use the Select Template drop-down menu to choose one of the templates available in your current project. Chronosphere also offers several processing rule templates in theprocessing-templates GitHub repository.

