|
名称 |
类型 |
描述 |
示例值 |
|---|---|---|---|
|
object |
告警规则条件配置。 该配置对象所包含的字段取决于条件类型(type 字段),不同的条件类型适用的字段不同。 |
||
| alertCount |
integer |
适用条件类型:SLS_CONDITION 满足条件几次后告警,默认为 1 |
1 |
| caseList |
array |
适用条件类型: SLS_CONDITION。 SLS 告警条件列表 |
|
|
object |
SLS 告警条件对象 |
||
| condition |
string |
匹配表达式,示例: logLevel: error |
logLevel: error |
| countCondition |
string |
数量匹配表达式,示例: 区间组合: count >= 3 && count <= 10 单区间: count >= 3 |
count >= 3 |
| level |
string |
满足条件后的告警级别 |
INFO |
| type |
string |
匹配类型: 有数据/有特定条数据/有数据匹配/有特定条数匹配。 取值范围:
|
HasData |
| compareList |
array |
适用条件类型:APM_CONDITION。 APM 告警比较条件列表 |
|
|
object |
APM 告警条件对象 |
||
| aggregate |
string |
时间序列后聚合函数
|
count |
| oper |
string |
比较操作,判断是否是同比、环比
|
GT |
| value |
number |
对比的阈值 |
50 |
| valueLevelList |
array |
不同值的报警级别的列表。 |
|
|
object |
不同值的报警级别,在多级 level 场景使用 |
||
| level |
string |
阈值对应的级别 |
INFO |
| value |
number |
对比的阈值 |
120 |
| yoyTimeUnit |
string |
同比时间单位(仅对 oper=YOY_UP/YOY_DOWN 生效) minute、hour、day、week、month |
month |
| yoyTimeValue |
integer |
同比时间的值,与 yoyTimeUnit 配合使用 |
1 |
| baseUnit |
string |
数据单位 |
% |
| displayUnit |
string |
展示单位 |
% |
| noDataAppendValue |
string |
适用条件类型:APM_CONDITION。 无数据时补偿的值。 |
1 |
| noDataAlertLevel |
string |
适用条件类型:APM_CONDITION。 无数据时的告警级别,不指定则不对无数据报警 |
INFO |
| type |
string |
规则条件类型,取值范围:
|
SLS_CONDITION |
| relation |
string |
适用条件类型:APM_CONDITION。 多个条件之间的逻辑关系。 取值:
|
and |
| escalationType |
string |
适用条件类型:CMS_BASIC_CONDITION 取值范围:
|
simple |
| simpleEscalation |
object |
适用条件类型:CMS_BASIC_CONDITION。 仅当 escalationType=simple 时有效,针对单一指标设置的告警条件 |
|
| metricName |
string |
适用条件类型:CMS_BASIC_CONDITION。 告警条件关联的指标 |
cpu_total |
| period |
integer |
指标的时间窗口,单位秒 |
60 |
| escalations |
array |
条件列表,同一个告警规则对应多个级别的,每一个级别会有一个条件对象。 |
|
|
object |
告警条件对象 |
||
| level |
string |
满足条件时触发的告警级别(表达式告警仅支持一个级别)
|
INFO |
| comparisonOperator |
string |
阈值比较符,取值范围:
|
GreaterThanOrEqualToThreshold |
| statistics |
string |
统计方法,该参数的取值由指定云产品的 MetricName 对应的 Statistics 列决定,例如:Maximum、Minimum 和 Average |
Average |
| times |
integer |
触发告警需满足条件的次数 |
3 |
| threshold |
number |
告警阈值 |
100 |
| compositeEscalation |
object |
适用条件类型:CMS_BASIC_CONDITION escalationType=composite 时有效,组合指标告警条件 |
|
| relation |
string |
多个指标条件之间的关系,取值为 and 或 or |
and |
| level |
string |
满足条件时触发的告警级别(多指标组合告警仅支持一个级别) |
INFO |
| times |
integer |
触发告警需满足条件的次数 |
3 |
| escalations |
array |
多指标的组合条件列表 |
|
|
object |
条件对象 |
||
| comparisonOperator |
string |
阈值比较符,取值范围:
|
GreaterThanOrEqualToThreshold |
| metricName |
string |
指标名称 |
cpu_total |
| period |
integer |
指标的时间窗口 |
60 |
| statistics |
string |
统计方法,该参数的取值由指定云产品的 MetricName 对应的 Statistics 列决定。 监控项的统计方法。取值示例:
说明 $为监控项的统一前缀符号。 |
$Maximum |
| threshold |
number |
告警阈值 |
50 |
| expressEscalation |
object |
适用条件类型:CMS_BASIC_CONDITION。 escalationType=composite 时有效,多指标组合告警条件。 |
|
| level |
string |
满足条件时触发的告警级别(表达式告警仅支持一个级别)
|
INFO |
| times |
integer |
触发告警需满足条件的次数 |
3 |
| rawExpression |
string |
告警条件表达式 |
@cpu_total[60].$Average > 60 |
| noDataPolicy |
string |
适用条件类型:CMS_BASIC_CONDITION。 无监控数据时报警的处理方式。取值:
|
KEEP_LAST_STATE |
| oper |
string |
比较操作,判断是否是同比、环比
|
LT |
| value |
number |
告警触发的阈值 |
60 |
该文章对您有帮助吗?