Class MetricAnomalyAlertScope

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

public final class MetricAnomalyAlertScope extends Object
Defines scope for anomaly alert. An alert can be scoped to whole series of a metric, a specific time series group of a metric or a metric TopN time series.
  • Method Details

    • getScopeType

      public MetricAnomalyAlertScopeType getScopeType()
      Gets the scope type.
      Returns:
      The scope type.
    • getSeriesGroupInScope

      public DimensionKey getSeriesGroupInScope()
      Gets the id of the time series group if alert is scoped to that group.
      Returns:
      The time series group id.
    • getTopNGroupInScope

      public TopNGroupScope getTopNGroupInScope()
      Gets the TopN scope value if alert is scoped to TopN time series.
      Returns:
      The TopN scope value.
    • forWholeSeries

      public static MetricAnomalyAlertScope forWholeSeries()
      Creates an MetricAnomalyAlertScope indicating that alert should be generated when anomalies are detected in any of the time series of a metric.
      Returns:
      The MetricAnomalyAlertScope.
    • forSeriesGroup

      public static MetricAnomalyAlertScope forSeriesGroup(DimensionKey seriesGroupId)
      Creates an MetricAnomalyAlertScope indicating that alert should be generated when anomalies are detected in a specific time series group of a metric.
      Parameters:
      seriesGroupId - the specific series keys.
      Returns:
      The MetricAnomalyAlertScope.
    • forTopNGroup

      public static MetricAnomalyAlertScope forTopNGroup(int top, int period, int minTopCount)
      Creates an MetricAnomalyAlertScope based on TopN scoping rule.
      Parameters:
      top - Defines the top rank for anomalies, An alert is generated when rank of minTopCount data-sets are in top.
      period - The number of latest data-set to consider for ranking. One data-set consists of data-points with the same timestamp across multiple time series, i.e, one data-point from one time-series.
      minTopCount - The anomalies occurred in the period data-sets are ranked, An alert is generated when rank of minTopCount data-sets are in top.
      Returns:
      The MetricAnomalyAlertScope.
    • forTopNGroup

      public static MetricAnomalyAlertScope forTopNGroup(TopNGroupScope topNGroup)
      Creates an MetricAnomalyAlertScope based on TopN scope. The TopN defines scope based on ranking of anomaly in data-sets. The computation of TopN scope consists of 3 parameters, top, period and minTopCount. the top defines the top rank for anomalies, period defines the number of latest data-set to consider for ranking and minTopCount indicate that an alert should be generated when rank of minTopCount data-sets are in top.
      Parameters:
      topNGroup - Defines the top, period and minTopCount values.
      Returns:
      The MetricAnomalyAlertScope.