Ingested logs can be triggers for opening new Davis problems.
Using a combination of metrics based on logs and Davis anomaly detectors, you can use the power of different Davis analyzers to address use cases from simple threshold-based alerting to seasonal baselines, for example:
Follow this guide to learn more about alerting with metrics based on logs.
If you don't need to set thresholds, you should follow the instructions in Set up Davis alerts based on events.
In this example we will open a new Davis Problem when certain records, which contain a specific phrase, are ingested and exceed a static threshold.
You can find alerts by opening Logs and using the following DQL query.
fetch logs| filter matchesPhrase(content, "Dropping data because sending_queue is full")| sort timestamp desc
If your DQL query uses parse
, fieldAdd
, or other transformations, you should add a processing rule to set those fields on ingest.
Add metric extraction configuration in OpenPipeline.
Open Settings > Process and contextualize > OpenPipeline > Logs and select the Pipelines tab.
Find the pipeline you want to modify, or add a new pipeline.
Select > Edit. The pipeline configuration page appears.
Select Metric extraction tab.
Set
The metric name and ID.
The DQL matcher. A matcher sets the condition for the event that is to be extracted. It is a subset of filtering conditions in a single DQL statement.
In Matching condition, use the matcher as shown below.
matchesPhrase(content, "Dropping data because sending_queue is full")
If you use Segments or your permissions are set at the record level, you should include those conditions in the matcher.
There are situations when a matcher can't be easily extracted from a DQL statement. In these cases, you can create log alerts for a log event or summary of log data.
dt.source_entity
dimension or any other field that contains an entity identifier.Go to Davis Anomaly Detection and create a new anomaly detector.
This section describes how to create a simple anomaly detector.
If you need to set additional advanced properties and fine-tune your alert, use the Advanced mode.
Set the scope for your alert.
Use DQL syntax to point the metric you created.
To have your alert connected to monitored entity make sure to add by: {dt.source_entity}
.
Define the alerting conditions under which a new Davis event will be generated. You can pick different Davis anomaly detection analyzers.
Finally set the event details like title and description.
When the alerting conditions are met you will see a new problem in Problems.
Here's when to use Davis Anomaly Detector with metrics based on logs:
http.response_time
.Detected anomalies can trigger automations using simple workflows as described in Create a simple workflow in Dynatrace Workflows.