Based on log processing rules that you create, Dynatrace Log Monitoring can reshape incoming log data for better understanding, analysis, or further processing by Dynatrace.
In the Dynatrace menu, go to Settings > Log Monitoring > Log processing to view log processing rules that are in effect, reorder the existing rules, and create new rules.
- By default, log processing includes many enabled built-in rules responsible for cleaning up or normalizing log data. The name of every built-in rule starts with
- Rules are executed in the order in which they're listed, from top to bottom, on the Log processing page. This order is critical because a preceding rule may impact the log data that a subsequent rule uses in its definition.
- Expand Details to examine a rule definition.
- You can view the details for built-in rules, but you can't edit or delete them.
- You can turn any rule on or off in the Active column.
A log processing rule consists of the following:
- Rule name
- Log query
- Rule definition
To create a log processing rule
In the Dynatrace menu, go to Settings > Log Monitoring > Log processing and select Add processing rule.
Provide the name for the log processing rule.
Provide a log query.
A log search query narrows down the available log data for executing this specific rule. This is the same search query that you have been using in the log viewer search query (Log viewer).
Provide the processing rule definition.
The processing rule definition is a log processing instruction about how Dynatrace should transform or modify your log data narrowed down by the Log query.
The rule definition is created using log processing commands (Log processing commands) and pattern matching (Dynatrace Pattern Language) that allows you to examine incoming log data and modify or create log data elements and attributes. This gives you total control over how your log data is presented to Dynatrace Log Monitoring.
Test the log processing rule.
You can test the rule definition by either downloading the sample log or providing a fragment of the sample log manually in the Log sample text box.
1. Select a log sample
- If you choose to download the sample log, the data used for testing the rule will be the matched result of the Log query.
- If you choose to provide a fragment of the log data manually, make sure it's in JSON format. Any textual log data should be inserted into the
contentfield of the JSON.
2. Run the test
Select Test the rule and view the result in the Test result text box.
Select Save changes.