DynamicMetricCriteria Class

public final class DynamicMetricCriteria
extends MultiMetricCriteria

Criterion for dynamic threshold.

Constructor Summary

Constructor Description
DynamicMetricCriteria()

Creates an instance of DynamicMetricCriteria class.

Method Summary

Modifier and Type Method and Description
DynamicThresholdSensitivity alertSensitivity()

Get the alertSensitivity property: The extent of deviation required to trigger an alert.

CriterionType criterionType()

Get the criterionType property: Specifies the type of threshold criteria.

DynamicThresholdFailingPeriods failingPeriods()

Get the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.

static DynamicMetricCriteria fromJson(JsonReader jsonReader)

Reads an instance of DynamicMetricCriteria from the JsonReader.

OffsetDateTime ignoreDataBefore()

Get the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).

DynamicThresholdOperator operator()

Get the operator property: The operator used to compare the metric value against the threshold.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

DynamicMetricCriteria withAlertSensitivity(DynamicThresholdSensitivity alertSensitivity)

Set the alertSensitivity property: The extent of deviation required to trigger an alert.

DynamicMetricCriteria withDimensions(List<MetricDimension> dimensions)

Set the dimensions property: List of dimension conditions.

DynamicMetricCriteria withFailingPeriods(DynamicThresholdFailingPeriods failingPeriods)

Set the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.

DynamicMetricCriteria withIgnoreDataBefore(OffsetDateTime ignoreDataBefore)

Set the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).

DynamicMetricCriteria withMetricName(String metricName)

Set the metricName property: Name of the metric.

DynamicMetricCriteria withMetricNamespace(String metricNamespace)

Set the metricNamespace property: Namespace of the metric.

DynamicMetricCriteria withName(String name)

Set the name property: Name of the criteria.

DynamicMetricCriteria withOperator(DynamicThresholdOperator operator)

Set the operator property: The operator used to compare the metric value against the threshold.

DynamicMetricCriteria withSkipMetricValidation(Boolean skipMetricValidation)

Set the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.

DynamicMetricCriteria withTimeAggregation(AggregationTypeEnum timeAggregation)

Set the timeAggregation property: the criteria time aggregation types.

Methods inherited from MultiMetricCriteria

Methods inherited from java.lang.Object

Constructor Details

DynamicMetricCriteria

public DynamicMetricCriteria()

Creates an instance of DynamicMetricCriteria class.

Method Details

alertSensitivity

public DynamicThresholdSensitivity alertSensitivity()

Get the alertSensitivity property: The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.

Returns:

the alertSensitivity value.

criterionType

public CriterionType criterionType()

Get the criterionType property: Specifies the type of threshold criteria.

Overrides:

DynamicMetricCriteria.criterionType()

Returns:

the criterionType value.

failingPeriods

public DynamicThresholdFailingPeriods failingPeriods()

Get the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.

Returns:

the failingPeriods value.

fromJson

public static DynamicMetricCriteria fromJson(JsonReader jsonReader)

Reads an instance of DynamicMetricCriteria from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DynamicMetricCriteria if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

ignoreDataBefore

public OffsetDateTime ignoreDataBefore()

Get the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).

Returns:

the ignoreDataBefore value.

operator

public DynamicThresholdOperator operator()

Get the operator property: The operator used to compare the metric value against the threshold.

Returns:

the operator value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

DynamicMetricCriteria.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

DynamicMetricCriteria.validate()

withAlertSensitivity

public DynamicMetricCriteria withAlertSensitivity(DynamicThresholdSensitivity alertSensitivity)

Set the alertSensitivity property: The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.

Parameters:

alertSensitivity - the alertSensitivity value to set.

Returns:

the DynamicMetricCriteria object itself.

withDimensions

public DynamicMetricCriteria withDimensions(List dimensions)

Set the dimensions property: List of dimension conditions.

Overrides:

DynamicMetricCriteria.withDimensions(List<MetricDimension> dimensions)

Parameters:

dimensions

withFailingPeriods

public DynamicMetricCriteria withFailingPeriods(DynamicThresholdFailingPeriods failingPeriods)

Set the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.

Parameters:

failingPeriods - the failingPeriods value to set.

Returns:

the DynamicMetricCriteria object itself.

withIgnoreDataBefore

public DynamicMetricCriteria withIgnoreDataBefore(OffsetDateTime ignoreDataBefore)

Set the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).

Parameters:

ignoreDataBefore - the ignoreDataBefore value to set.

Returns:

the DynamicMetricCriteria object itself.

withMetricName

public DynamicMetricCriteria withMetricName(String metricName)

Set the metricName property: Name of the metric.

Overrides:

DynamicMetricCriteria.withMetricName(String metricName)

Parameters:

metricName

withMetricNamespace

public DynamicMetricCriteria withMetricNamespace(String metricNamespace)

Set the metricNamespace property: Namespace of the metric.

Overrides:

DynamicMetricCriteria.withMetricNamespace(String metricNamespace)

Parameters:

metricNamespace

withName

public DynamicMetricCriteria withName(String name)

Set the name property: Name of the criteria.

Overrides:

DynamicMetricCriteria.withName(String name)

Parameters:

name

withOperator

public DynamicMetricCriteria withOperator(DynamicThresholdOperator operator)

Set the operator property: The operator used to compare the metric value against the threshold.

Parameters:

operator - the operator value to set.

Returns:

the DynamicMetricCriteria object itself.

withSkipMetricValidation

public DynamicMetricCriteria withSkipMetricValidation(Boolean skipMetricValidation)

Set the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.

Overrides:

DynamicMetricCriteria.withSkipMetricValidation(Boolean skipMetricValidation)

Parameters:

skipMetricValidation

withTimeAggregation

public DynamicMetricCriteria withTimeAggregation(AggregationTypeEnum timeAggregation)

Set the timeAggregation property: the criteria time aggregation types.

Overrides:

DynamicMetricCriteria.withTimeAggregation(AggregationTypeEnum timeAggregation)

Parameters:

timeAggregation

Applies to