The metric selector is a powerful instrument for specifying which data you want to read for the metric event evaluation. It provides you with two major possibilities:
With the metric selector, Davis can access the historic data of the metric and can learn the normal behavior of your environment, enabling you to use auto-adaptive thresholds in your metric event. However, some limitations apply:
The selector itself defines the scope of a metric selector event. It is important to understand the implications when configuring a selector consisting of measurements from thousands of individual sources. Dynatrace applies safety limits to anomaly detection in terms of the number of metric dimensions that can be observed within one monitoring environment to avoid any operational issues. To learn how to narrow down the scope of your configuration, see Filter transformation.

With the power of a metric expression, you can implement alerting with a top-down view of a situation rather than alerting on each component.
For example, you can observe log patterns across multiple hosts. By calculating the total count of observed log patterns across all relevant log files, Dynatrace can detect pattern anomalies on the accumulated log stream rather than on the individual counts per log file. If there are sparse counts across many entities (for example, an error count across multiple processes of the same type), aggregated top-down anomaly detection is much more resilient against false-positive alerts than detection on an individual error count per process.
Go to Settings > Anomaly Detection > Metric events and select Add metric event.
In the Summary field, provide a short meaningful description of the event.
In the Query definition section, configure the metric query:
Select a management zone. Only data coming from this zone is evaluated for the metric event. Omit this field to use all the data queried by the metric selector.
Optional In the Advanced query definition section, specify the query's offset (in minutes).
You need the offset for metrics with latency; otherwise, the metric event might produce false alerts.
Define the monitoring strategy
Check the preview for your alert and evaluate the effectiveness of your configuration.
Provide a Title for your event. The title should be a short, easy-to-read string describing the situation, such as High network activity or CPU saturation.
In the Description section, create a meaningful event message. Event messages help you understand the nature of the event. You can use the following placeholders:
{alert_condition}—the condition of the alert (above/below the threshold).{baseline}—the violated value of the baseline.{dims}—a list of all dimensions (and their values) of the metric that violated the threshold. You can also specify a particular dimension: {dims:dt.entity.<entity>}. To fetch the list of available dimensions for your metric, query it via the GET metric descriptor request.{entityname}—the name of the affected entity.{metricname}—the name of the metric that violated the threshold.{missing_data_samples}—the number of samples with missing data. Only available if missing data alert is enabled.
{missing_data_samples} in the event descriptionWe recommend including the {missing_data_samples} placeholder in the event description to see whether the problem is raised due to missing data samples or threshold violations.
{severity}—the severity of the event.{threshold}—the violated value of the threshold.Select the Event type for triggered events.
Turn Allow merge on or off to define the merge strategy for triggered events.
If Allow merge is turned on, Davis AI will try to merge this event into existing problems; if it's turned off, a new problem is raised each time.
Optional Set additional key-value properties to be attached to the event.
Select Save changes.