• Home
  • Dynatrace API
  • Environment
  • Settings
  • Schemas
  • Metric events

Settings 2.0 - Metric events schema

Metric events (builtin:anomaly-detection.metric-events)

Metric event configurations are used to automatically detect anomalies in metric timeseries by using thresholds or baselines.

Schema IDSchema groupsScope
builtin:anomaly-detection.metric-events
  • group:anomaly-detection
environment
Retrieve schema via Settings API
GETManagedhttps://{your-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:anomaly-detection.metric-events
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/settings/schemas/builtin:anomaly-detection.metric-events
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/settings/schemas/builtin:anomaly-detection.metric-events

Authentication

To execute this request, you need an access token with Read settings (settings.read) scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

PropertyLabelTypeDescriptionRequired
enabledEnabledboolean-required
summarySummarytext

The textual summary of the metric event entry

required
queryDefinitionQuery definitionQueryDefinition-required
modelPropertiesMonitoring strategyModelProperties-required
eventTemplateEvent templateEventTemplate-required
eventEntityDimensionKeyDimension key of entity for eventstext

Controls the preferred entity type used for triggered events.

optional
legacyIdConfig idtext-optional

Request body objects

The MetadataItem object
PropertyLabelTypeDescriptionRequired
metadataKeyKeytext

Type 'dt.' for key hints.

required
metadataValueValuetext

Type '{' for placeholder hints.

required
The EntityFilterCondition object
PropertyLabelTypeDescriptionRequired
typeFilter typeenum-required
operatorOperatorenum-required
valueValuetext-required
The EntityFilter object
PropertyLabelTypeDescriptionRequired
dimensionKeyDimension key of entity typetext

Dimension key of entity type to filter

optional
conditions-list-required
The DimensionFilter object
PropertyLabelTypeDescriptionRequired
dimensionKeyDimension keytext-required
dimensionValueDimension valuetext-required
The QueryDefinition object
PropertyLabelTypeDescriptionRequired
typeTypeenum-required
metricSelectorMetric selectortext

To learn more, visit Metric Selector

required
metricKeyMetric keytext-required
aggregationAggregationenum-required
managementZoneManagement zonetext-optional
queryOffsetQuery offsetinteger

Minute offset of sliding evaluation window for metrics with latency

optional
entityFilterEntitiesEntityFilter

Use rule-based filters to define the scope this event monitors.

required
dimensionFilterDimension filterlist-required
The ModelProperties object
PropertyLabelTypeDescriptionRequired
typeModel typeenum

Metric-key-based query definitions only support static thresholds.

required
thresholdThresholdfloat

Raise an event if this value is violated

required
alertOnNoDataAlert on missing databoolean

The ability to set an alert on missing data in a metric. When enabled, missing data samples will contribute as violating samples defined in advanced model properties. We recommend to not alert on missing data for sparse timeseries as this leads to alert spam.

required
signalFluctuationNumber of signal fluctuationsfloat

Controls how many times the signal fluctuation is added to the baseline to produce the actual threshold for alerting

required
toleranceTolerancefloat

Controls the width of the confidence band and larger values lead to a less sensitive model

required
alertConditionAlert conditionenum-required
violatingSamplesViolating samplesinteger

The number of one-minute samples within the evaluation window that must violate to trigger an event.

required
samplesSliding windowinteger

The number of one-minute samples that form the sliding evaluation window.

required
dealertingSamplesDealerting samplesinteger

The number of one-minute samples within the evaluation window that must go back to normal to close the event.

required
The EventTemplate object
PropertyLabelTypeDescriptionRequired
titleTitletext

The title of the event to trigger. Type '{' for placeholder hints.

required
descriptionDescriptiontext

The description of the event to trigger. Type '{' for placeholder hints.

required
eventTypeEvent typeenum

The event type to trigger.

required
davisMergeAllow mergeboolean

Davis® AI will try to merge this event into existing problems, otherwise a new problem will always be created.

required
metadataPropertiesset

Set of additional key-value properties to be attached to the triggered event.

required