ThresholdRuleCondition Class
- java.
lang. Object - com.
microsoft. azure. management. monitor. RuleCondition - com.
microsoft. azure. management. monitor. ThresholdRuleCondition
- com.
- com.
public class ThresholdRuleCondition
extends RuleCondition
A rule condition based on a metric crossing a threshold.
Constructor Summary
Constructor | Description | |
---|---|---|
ThresholdRuleCondition() |
Method Summary
Modifier and Type | Method and Description |
---|---|
Condition |
operator()
Get the operator used to compare the data and the threshold. |
double |
threshold()
Get the threshold value that activates the alert. |
Time |
timeAggregation()
Get the time aggregation operator. |
org.joda.time.Period |
windowSize()
Get the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. |
Threshold |
withOperator(ConditionOperator operator)
Set the operator used to compare the data and the threshold. |
Threshold |
withThreshold(double threshold)
Set the threshold value that activates the alert. |
Threshold |
withTimeAggregation(TimeAggregationOperator timeAggregation)
Set the time aggregation operator. |
Threshold |
withWindowSize(Period windowSize)
Set the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. |
Methods inherited from RuleCondition
Methods inherited from java.lang.Object
Constructor Details
ThresholdRuleCondition
public ThresholdRuleCondition()
Method Details
operator
public ConditionOperator operator()
Get the operator used to compare the data and the threshold. Possible values include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'.
Returns:
threshold
public double threshold()
Get the threshold value that activates the alert.
Returns:
timeAggregation
public TimeAggregationOperator timeAggregation()
Get the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Last'.
Returns:
windowSize
public Period windowSize()
Get the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
Returns:
withOperator
public ThresholdRuleCondition withOperator(ConditionOperator operator)
Set the operator used to compare the data and the threshold. Possible values include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'.
Parameters:
Returns:
withThreshold
public ThresholdRuleCondition withThreshold(double threshold)
Set the threshold value that activates the alert.
Parameters:
Returns:
withTimeAggregation
public ThresholdRuleCondition withTimeAggregation(TimeAggregationOperator timeAggregation)
Set the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible values include: 'Average', 'Minimum', 'Maximum', 'Total', 'Last'.
Parameters:
Returns:
withWindowSize
public ThresholdRuleCondition withWindowSize(Period windowSize)
Set the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for