Class MetricAlertConfiguration
java.lang.Object
com.azure.ai.metricsadvisor.administration.models.MetricAlertConfiguration
Defines alerting settings for anomalies detected by a detection
configuration.
-
Constructor Summary
ConstructorDescriptionMetricAlertConfiguration
(String detectionConfigurationId, MetricAnomalyAlertScope alertScope) Creates a new instance of MetricAlertConfiguration.MetricAlertConfiguration
(String detectionConfigurationId, MetricAnomalyAlertScope alertScope, boolean negationOperation) Creates a new instance of MetricAlertConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionGets the conditions applied on the detected anomalies to decide whether it should be included in the alert or not.Gets the alert scope.Gets the condition to snooze the inclusion of anomalies in the upcoming alerts.Gets the anomaly detection configuration id.True if this configuration is used only as an expression to take part in the operation performed among corresponding series in other configurations.setAlertConditions
(MetricAnomalyAlertConditions alertConditions) Sets the conditions to be applied on the detected anomalies to decide whether it should be included in the alert or not.setAlertSnoozeCondition
(MetricAnomalyAlertSnoozeCondition snoozeCondition) Sets the snooze condition.setNegationOperation
(boolean negationOperation) Sets the negation value.setScopeOfAlertTo
(MetricAnomalyAlertScope alertScope) Sets the alert scope.
-
Constructor Details
-
MetricAlertConfiguration
public MetricAlertConfiguration(String detectionConfigurationId, MetricAnomalyAlertScope alertScope) Creates a new instance of MetricAlertConfiguration.- Parameters:
detectionConfigurationId
- The anomaly detection configuration id.alertScope
- The scope for the alert.
-
MetricAlertConfiguration
public MetricAlertConfiguration(String detectionConfigurationId, MetricAnomalyAlertScope alertScope, boolean negationOperation) Creates a new instance of MetricAlertConfiguration.- Parameters:
detectionConfigurationId
- The anomaly detection configuration id.alertScope
- The scope for the alert.negationOperation
- if true anomalies in this configuration will not be included in alerts, instead result of applying the configuration become an expression to take part in the operation performed among corresponding series in other configurations. The result of expression is true only if there is no anomaly found in the series.
-
-
Method Details
-
getDetectionConfigurationId
Gets the anomaly detection configuration id.- Returns:
- The detection configuration id.
-
isNegationOperationEnabled
True if this configuration is used only as an expression to take part in the operation performed among corresponding series in other configurations.- Returns:
- The negation operation value.
-
getAlertScope
Gets the alert scope.- Returns:
- The alert scope.
-
getAlertConditions
Gets the conditions applied on the detected anomalies to decide whether it should be included in the alert or not.- Returns:
- The alert conditions.
-
getAlertSnoozeCondition
Gets the condition to snooze the inclusion of anomalies in the upcoming alerts.- Returns:
- The snooze condition.
-
setNegationOperation
Sets the negation value. if true anomalies in this configuration will not be included in alerts, instead result of applying the configuration become an expression to take part in the operation performed among corresponding series in other configurations. The result of expression is true only if there is no anomaly found in the series.- Parameters:
negationOperation
- The negation operation value.- Returns:
- The MetricAlertConfiguration object itself.
-
setScopeOfAlertTo
Sets the alert scope.- Parameters:
alertScope
- The alert scope.- Returns:
- The MetricAlertConfiguration object itself.
-
setAlertConditions
Sets the conditions to be applied on the detected anomalies to decide whether it should be included in the alert or not.- Parameters:
alertConditions
- The alert conditions.- Returns:
- The MetricAlertConfiguration object itself.
-
setAlertSnoozeCondition
public MetricAlertConfiguration setAlertSnoozeCondition(MetricAnomalyAlertSnoozeCondition snoozeCondition) Sets the snooze condition. Once anomalies are alerted, this condition will be used to snooze the inclusion of anomalies in upcoming alerts.- Parameters:
snoozeCondition
- The snooze condition.- Returns:
- The MetricAlertConfiguration object itself.
-