MetricAnomalyAlertScope Class
- java.
lang. Object - com.
azure. ai. metricsadvisor. administration. models. MetricAnomalyAlertScope
- com.
public final class MetricAnomalyAlertScope
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 Summary
Modifier and Type | Method and Description |
---|---|
static
Metric |
forSeriesGroup(DimensionKey seriesGroupId)
Creates an Metric |
static
Metric |
forTopNGroup(TopNGroupScope topNGroup)
Creates an Metric |
static
Metric |
forTopNGroup(int top, int period, int minTopCount)
Creates an Metric |
static
Metric |
forWholeSeries()
Creates an Metric |
Metric |
getScopeType()
Gets the scope type. |
Dimension |
getSeriesGroupInScope()
Gets the id of the time series group if alert is scoped to that group. |
Top |
getTopNGroupInScope()
Gets the TopN scope value if alert is scoped to TopN time series. |
Methods inherited from java.lang.Object
Method Details
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:
Returns:
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:
Returns:
forTopNGroup
public static MetricAnomalyAlertScope forTopNGroup(int top, int period, int minTopCount)
Creates an MetricAnomalyAlertScope based on TopN scoping rule.
Parameters:
minTopCount
data-sets are in top
.
period
data-sets are ranked,
An alert is generated when rank of minTopCount
data-sets
are in top
.
Returns:
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:
getScopeType
public MetricAnomalyAlertScopeType getScopeType()
Gets the scope type.
Returns:
getSeriesGroupInScope
public DimensionKey getSeriesGroupInScope()
Gets the id of the time series group if alert is scoped to that group.
Returns:
getTopNGroupInScope
public TopNGroupScope getTopNGroupInScope()
Gets the TopN scope value if alert is scoped to TopN time series.
Returns:
Applies to
Azure SDK for Java