你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ThresholdRuleCondition 类

定义

基于越过阈值的指标的规则条件。

public class ThresholdRuleCondition : Azure.ResourceManager.Monitor.Models.AlertRuleCondition
type ThresholdRuleCondition = class
    inherit AlertRuleCondition
Public Class ThresholdRuleCondition
Inherits AlertRuleCondition
继承
ThresholdRuleCondition

构造函数

ThresholdRuleCondition(MonitorConditionOperator, Double)

初始化 ThresholdRuleCondition 的新实例。

属性

DataSource

规则从中收集数据的资源。 对于此类型,dataSource 将始终为 RuleMetricDataSource 类型。 请注意 RuleDataSource , 是基类。 根据方案,可能需要在此处分配基类的派生类,或者需要将此属性强制转换为可能的派生类之一。 可用的派生类包括 RuleManagementEventDataSourceRuleMetricDataSource

(继承自 AlertRuleCondition)
Operator

用于比较数据和阈值的运算符。

Threshold

激活警报的阈值。

TimeAggregation

时间聚合运算符。 收集的数据应如何随着时间推移而合并。 默认值为 Metric 的 PrimaryAggregationType。

WindowSize

iso 8601 持续时间格式 (的时间段) ,用于根据阈值监视警报活动。 如果指定,则它必须介于 5 分钟到 1 天之间。

适用于