Class MetricBoundaryCondition

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

public final class MetricBoundaryCondition extends Object
Defines the boundary conditions for the anomaly (abnormal data points) to be included in the alert.
  • Constructor Details

    • MetricBoundaryCondition

      public MetricBoundaryCondition()
  • Method Details

    • getDirection

      public BoundaryDirection getDirection()
      Gets the boundary direction.
      Returns:
      The boundary direction.
    • getLowerBoundary

      public Double 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 either BoundaryDirection.LOWER or BoundaryDirection.BOTH.
      Returns:
      The lower boundary.
    • getUpperBoundary

      public Double 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 either BoundaryDirection.UPPER or BoundaryDirection.BOTH.
      Returns:
      The upper boundary.
    • getCompanionMetricId

      public String 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

      public Boolean 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

      public BoundaryMeasureType 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 - Both lowerBoundary and upperBoundary must be specified when the direction is BoundaryDirection.BOTH. The lowerBoundary must be specified for BoundaryDirection.LOWER, similarly upperBoundary must set specified for BoundaryDirection.UPPER.
      lowerBoundary - The lower boundary value.
      upperBoundary - The upper boundary value.
      Returns:
      The MetricBoundaryCondition object itself.
    • setCompanionMetricId

      public MetricBoundaryCondition setCompanionMetricId(String companionMetricId)
      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

      public MetricBoundaryCondition setMeasureType(BoundaryMeasureType measureType)
      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.