Class MetricBoundaryCondition
java.lang.Object
com.azure.ai.metricsadvisor.administration.models.MetricBoundaryCondition
Defines the boundary conditions for the anomaly (abnormal data points) to be included in the alert.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the id of the companion metric.Gets the boundary direction.Gets the lower boundary, if the detected abnormal data point is below this value then it will be included in the alert.Gets the measure type that detector should use for measuring data-points.Gets the upper boundary.setBoundary
(BoundaryDirection direction, Double lowerBoundary, Double upperBoundary) Sets the boundary.setCompanionMetricId
(String companionMetricId) Sets the companion metric id.setCompanionMetricId
(String companionMetricId, boolean alertIfMissing) Sets the companion metric id.setMeasureType
(BoundaryMeasureType measureType) Sets the measure type that detector should use for measuring data-points.True if alert will be triggered when the companion-metric data-points are out of boundary but the corresponding data-point is missing for the original metric.
-
Constructor Details
-
MetricBoundaryCondition
public MetricBoundaryCondition()
-
-
Method Details
-
getDirection
Gets the boundary direction.- Returns:
- The boundary direction.
-
getLowerBoundary
Gets the lower boundary, if the detected abnormal data point is below this value then it will be included in the alert. This boundary is taken into consideration only if the direction is eitherBoundaryDirection.LOWER
orBoundaryDirection.BOTH
.- Returns:
- The lower boundary.
-
getUpperBoundary
Gets the upper boundary. if the detected abnormal data point is above this value then it will be included in the alert. This boundary is taken into consideration only if the direction is eitherBoundaryDirection.UPPER
orBoundaryDirection.BOTH
.- Returns:
- The upper boundary.
-
getCompanionMetricId
Gets the id of the companion metric. When the companion-metric is set for a metric, the abnormal data points detected in the original metric will be included in the alert only if data points values of corresponding series in companion-metric are not within the boundary.- Returns:
- The companion metric id.
-
shouldAlertIfDataPointMissing
True if alert will be triggered when the companion-metric data-points are out of boundary but the corresponding data-point is missing for the original metric.- Returns:
- True if alert is triggered for missing data-points, false otherwise.
-
getMeasureType
Gets the measure type that detector should use for measuring data-points.- Returns:
- the measure type.
-
setBoundary
public MetricBoundaryCondition setBoundary(BoundaryDirection direction, Double lowerBoundary, Double upperBoundary) Sets the boundary.- Parameters:
direction
- BothlowerBoundary
andupperBoundary
must be specified when the direction isBoundaryDirection.BOTH
. ThelowerBoundary
must be specified forBoundaryDirection.LOWER
, similarlyupperBoundary
must set specified forBoundaryDirection.UPPER
.lowerBoundary
- The lower boundary value.upperBoundary
- The upper boundary value.- Returns:
- The MetricBoundaryCondition object itself.
-
setCompanionMetricId
Sets the companion metric id. When the companion-metric is set for a metric, an anomaly detected in the original metric will be included in the alert only if data points values of corresponding series in companion-metric are not within the boundary.- Parameters:
companionMetricId
- The companion metric id.- Returns:
- The MetricBoundaryCondition object itself.
-
setCompanionMetricId
public MetricBoundaryCondition setCompanionMetricId(String companionMetricId, boolean alertIfMissing) Sets the companion metric id. When the companion-metric is set for a metric, an anomaly detected in the original metric series will be included in the alert only if data points values of corresponding series in companion-metric are not within the boundary.- Parameters:
companionMetricId
- The companion metric id.alertIfMissing
- Indicate whether or not alert should be triggered when the companion-metric data-points are out of boundary but the corresponding data-point is missing for the original metric.- Returns:
- The MetricBoundaryCondition object itself.
-
setMeasureType
Sets the measure type that detector should use for measuring data-points.- Parameters:
measureType
- the type of measure to use.- Returns:
- The MetricBoundaryCondition object itself.
-