Class MetricAnomalyAlertScope
java.lang.Object
com.azure.ai.metricsadvisor.administration.models.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 TypeMethodDescriptionstatic 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.static MetricAnomalyAlertScope
forTopNGroup
(int top, int period, int minTopCount) Creates an MetricAnomalyAlertScope based on TopN scoping rule.static MetricAnomalyAlertScope
forTopNGroup
(TopNGroupScope topNGroup) Creates an MetricAnomalyAlertScope based on TopN scope.static MetricAnomalyAlertScope
Creates an MetricAnomalyAlertScope indicating that alert should be generated when anomalies are detected in any of the time series of a metric.Gets the scope type.Gets the id of the time series group if alert is scoped to that group.Gets the TopN scope value if alert is scoped to TopN time series.
-
Method Details
-
getScopeType
Gets the scope type.- Returns:
- The scope type.
-
getSeriesGroupInScope
Gets the id of the time series group if alert is scoped to that group.- Returns:
- The time series group id.
-
getTopNGroupInScope
Gets the TopN scope value if alert is scoped to TopN time series.- Returns:
- The TopN scope value.
-
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
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
Creates an MetricAnomalyAlertScope based on TopN scoping rule.- Parameters:
top
- Defines the top rank for anomalies, An alert is generated when rank ofminTopCount
data-sets are intop
.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 theperiod
data-sets are ranked, An alert is generated when rank ofminTopCount
data-sets are intop
.- Returns:
- The MetricAnomalyAlertScope.
-
forTopNGroup
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.
-