Class MetricAlertConfiguration

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

public final class MetricAlertConfiguration extends Object
Defines alerting settings for anomalies detected by a detection configuration.
  • 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

      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.
    • getAlertScope

      public MetricAnomalyAlertScope getAlertScope()
      Gets the alert scope.
      Returns:
      The alert scope.
    • 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.
    • getAlertSnoozeCondition

      public MetricAnomalyAlertSnoozeCondition getAlertSnoozeCondition()
      Gets the condition to snooze the inclusion of anomalies in the upcoming alerts.
      Returns:
      The snooze condition.
    • 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.
    • 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.