MetricAlertConfiguration Class

  • java.lang.Object
    • com.azure.ai.metricsadvisor.administration.models.MetricAlertConfiguration

public final class MetricAlertConfiguration

Defines alerting settings for anomalies detected by a detection configuration.

Constructor Summary

Constructor Description
MetricAlertConfiguration(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 Type Method and Description
MetricAnomalyAlertConditions getAlertConditions()

Gets the conditions applied on the detected anomalies to decide whether it should be included in the alert or not.

MetricAnomalyAlertScope getAlertScope()

Gets the alert scope.

MetricAnomalyAlertSnoozeCondition getAlertSnoozeCondition()

Gets the condition to snooze the inclusion of anomalies in the upcoming alerts.

String getDetectionConfigurationId()

Gets the anomaly detection configuration id.

Boolean isNegationOperationEnabled()

True if this configuration is used only as an expression to take part in the operation performed among corresponding series in other configurations.

MetricAlertConfiguration 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.

MetricAlertConfiguration setAlertSnoozeCondition(MetricAnomalyAlertSnoozeCondition snoozeCondition)

Sets the snooze condition.

MetricAlertConfiguration setNegationOperation(boolean negationOperation)

Sets the negation value.

MetricAlertConfiguration setScopeOfAlertTo(MetricAnomalyAlertScope alertScope)

Sets the alert scope.

Methods inherited from java.lang.Object

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

getAlertConditions

public MetricAnomalyAlertConditions 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.

getAlertScope

public MetricAnomalyAlertScope getAlertScope()

Gets the alert scope.

Returns:

The alert scope.

getAlertSnoozeCondition

public MetricAnomalyAlertSnoozeCondition getAlertSnoozeCondition()

Gets the condition to snooze the inclusion of anomalies in the upcoming alerts.

Returns:

The snooze condition.

getDetectionConfigurationId

public String getDetectionConfigurationId()

Gets the anomaly detection configuration id.

Returns:

The detection configuration id.

isNegationOperationEnabled

public Boolean 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.

setAlertConditions

public MetricAlertConfiguration 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.

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.

setNegationOperation

public MetricAlertConfiguration setNegationOperation(boolean negationOperation)

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

public MetricAlertConfiguration setScopeOfAlertTo(MetricAnomalyAlertScope alertScope)

Sets the alert scope.

Parameters:

alertScope - The alert scope.

Returns:

The MetricAlertConfiguration object itself.

Applies to