| object | | |
Code | integer | The HTTP status code.
Note
The status code 200 indicates that the call is successful.
| 200 |
Message | string | | The specified resource is not found. |
RequestId | string | | 386C6712-335F-5054-930A-CC92B851ECBA |
Total | string | The total number of returned entries. | 1 |
Success | boolean | Indicates whether the call is successful. Valid values:
- true: The call is successful.
- false: The call fails.
| true |
Alarms | array<object> | | |
| object | | |
SilenceTime | integer | The mute period during which new alert notifications are not sent even if the trigger conditions are met. Unit: seconds. Default value: 86400. Minimum value: 3600.
Only one alert is reported during each mute period even if the metric value consecutively exceeds the alert rule threshold several times. | 86400 |
MetricName | string | | cpu_total |
Webhook | string | The callback URL. CloudMonitor pushes an alert notification to the specified callback URL by sending an HTTP POST request. Only the HTTP protocol is supported. | https://www.aliyun.com |
ContactGroups | string | | ECS_Alarm |
SourceType | string | The type of the alert rule. Valid value: METRIC. This value indicates an alert rule for time series metrics. | METRIC |
Namespace | string | The namespace of the cloud service. | acs_ecs_dashboard |
MailSubject | string | The subject of the alert notification email. | "${serviceType}-${metricName}-${levelDescription}Notification(${dimensions})"
|
NoEffectiveInterval | string | The time period during which the alert rule is ineffective. | 00:00-05:30 |
EffectiveInterval | string | The time period during which the alert rule is effective. | 05:31-23:59 |
RuleName | string | The name of the alert rule. | Rule_01 |
AlertState | string | The status of the alert rule. Valid values:
- OK: The alert rule has no active alerts.
- ALARM: The alert rule has active alerts.
- INSUFFICIENT_DATA: No data is available.
| OK |
Period | string | | 60 |
RuleId | string | The ID of the alert rule. | applyTemplate344cfd42-0f32-4fd6-805a-88d7908a**** |
GroupName | string | The name of the application group.
Note
If the alert rule is associated with an application group, the name of the application group is returned in this parameter.
| ECS_Group |
GroupId | string | The ID of the application group. | 7301**** |
Dimensions | string | The dimensions of the alert rule. | [{"instanceId":"i-2ze2d6j5uhg20x47****"}] |
EnableState | boolean | Indicates whether the alert rule is enabled. Valid values:
- true: The alert rule is enabled.
- false: The alert rule is disabled.
| true |
Resources | string | The resources that are associated with the alert rule. | [{\"instanceId\":\"i-2ze2d6j5uhg20x47****\"}] |
Escalations | object | The conditions for triggering different levels of alerts. | |
Info | object | The conditions for triggering Info-level alerts. | |
ComparisonOperator | string | The comparison operator that is used to compare the metric value with the threshold. Valid values:
- GreaterThanOrEqualToThreshold: greater than or equal to the threshold
- GreaterThanThreshold: greater than the threshold
- LessThanOrEqualToThreshold: less than or equal to the threshold
- LessThanThreshold: less than the threshold
- NotEqualToThreshold: not equal to the threshold
- GreaterThanYesterday: greater than the metric value at the same time yesterday
- LessThanYesterday: less than the metric value at the same time yesterday
- GreaterThanLastWeek: greater than the metric value at the same time last week
- LessThanLastWeek: less than the metric value at the same time last week
- GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle
- LessThanLastPeriod: less than the metric value in the last monitoring cycle
| GreaterThanOrEqualToThreshold |
PreCondition | string | The additional conditions for triggering Info-level alerts. The additional conditions take effect when the value of the ComparisonOperator parameter is GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, or LessThanLastPeriod.
For example, the values of the PreCondition, ComparisonOperator, and Threshold parameters are set to $Average>80, GreaterThanYesterday, and 10, respectively. An alert is triggered only when the average metric value is greater than 80 and 10% greater than the average metric value at the same time yesterday.
Note
$Average is a placeholder that consists of a dollar sign ($) and the statistical method . CloudMonitor replaces the placeholder with the aggregated value or original value before value comparison.
| $Average>80 |
Times | integer | The consecutive number of times for which the metric value meets the alert condition before an Info-level alert is triggered. | 3 |
Threshold | string | The threshold for Info-level alerts. | 90 |
Statistics | string | The statistical methods for Info-level alerts. | Average |
Warn | object | The conditions for triggering Warn-level alerts. | |
ComparisonOperator | string | The comparison operator that is used to compare the metric value with the threshold. Valid values:
- GreaterThanOrEqualToThreshold: greater than or equal to the threshold
- GreaterThanThreshold: greater than the threshold
- LessThanOrEqualToThreshold: less than or equal to the threshold
- LessThanThreshold: less than the threshold
- NotEqualToThreshold: not equal to the threshold
- GreaterThanYesterday: greater than the metric value at the same time yesterday
- LessThanYesterday: less than the metric value at the same time yesterday
- GreaterThanLastWeek: greater than the metric value at the same time last week
- LessThanLastWeek: less than the metric value at the same time last week
- GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle
- LessThanLastPeriod: less than the metric value in the last monitoring cycle
| GreaterThanOrEqualToThreshold |
PreCondition | string | The additional conditions for triggering Warn-level alerts. The additional conditions take effect when the value of the ComparisonOperator parameter is GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, or LessThanLastPeriod.
For example, the values of the PreCondition, ComparisonOperator, and Threshold parameters are set to $Average>80, GreaterThanYesterday, and 10, respectively. An alert is triggered only when the average metric value is greater than 80 and 10% greater than the average metric value at the same time yesterday.
Note
$Average is a placeholder that consists of a dollar sign ($) and the statistical method . CloudMonitor replaces the placeholder with the aggregated value or original value before value comparison.
| $Average>80 |
Times | integer | The consecutive number of times for which the metric value meets the alert condition before a Warn-level alert is triggered. | 3 |
Threshold | string | The threshold for Warn-level alerts. | 90 |
Statistics | string | The statistical methods for Warn-level alerts. | Average |
Critical | object | The conditions for triggering Critical-level alerts. | |
ComparisonOperator | string | The comparison operator that is used to compare the metric value with the threshold. Valid values:
- GreaterThanOrEqualToThreshold: greater than or equal to the threshold
- GreaterThanThreshold: greater than the threshold
- LessThanOrEqualToThreshold: less than or equal to the threshold
- LessThanThreshold: less than the threshold
- NotEqualToThreshold: not equal to the threshold
- GreaterThanYesterday: greater than the metric value at the same time yesterday
- LessThanYesterday: less than the metric value at the same time yesterday
- GreaterThanLastWeek: greater than the metric value at the same time last week
- LessThanLastWeek: less than the metric value at the same time last week
- GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle
- LessThanLastPeriod: less than the metric value in the last monitoring cycle
| GreaterThanOrEqualToThreshold |
PreCondition | string | The additional conditions for triggering Critical-level alerts. The additional conditions take effect when the value of the ComparisonOperator parameter is GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, or LessThanLastPeriod.
For example, the values of the PreCondition, ComparisonOperator, and Threshold parameters are set to $Average>80, GreaterThanYesterday, and 10, respectively. An alert is triggered only when the average metric value is greater than 80 and 10% greater than the average metric value at the same time yesterday.
Note
$Average is a placeholder that consists of a dollar sign ($) and the statistical method . CloudMonitor replaces the placeholder with the aggregated value or original value before value comparison.
| $Average>80 |
Times | integer | The consecutive number of times for which the metric value meets the alert condition before a Critical-level alert is triggered. | 3 |
Threshold | string | The threshold for Critical-level alerts. | 90 |
Statistics | string | The statistical methods for Critical-level alerts. | Average |
NoDataPolicy | string | The method that is used to handle alerts when no monitoring data is found. Valid values:
- KEEP_LAST_STATE (default value): No operation is performed.
- INSUFFICIENT_DATA: An alert whose content is "Insufficient data" is triggered.
- OK: The status is considered normal.
| KEEP_LAST_STATE |
CompositeExpression | object | The trigger conditions for multiple metrics.
Note
The trigger conditions for a single metric and multiple metrics are mutually exclusive. You cannot specify trigger conditions for a single metric and multiple metrics at the same time.
| |
Level | string | The alert level. Valid values:
| Critical |
ExpressionList | array<object> | The trigger conditions that are created in standard mode. | |
| object | | |
MetricName | string | The metric that is used to monitor the cloud service. | cpu_total |
Period | integer | The aggregation period of the metric.
Unit: seconds. | 60 |
Statistics | string | The statistical method of the metric. Valid values:
- $Maximum: the maximum value
- $Minimum: the minimum value
- $Average: the average value
- $Availability: the availability rate (usually used for site monitoring)
Note
$ is the prefix of the metric. For information about the Alibaba Cloud services that are supported by CloudMonitor, see Appendix 1: Metrics.
| $Maximum |
ComparisonOperator | string | The operator that is used to compare the metric value with the threshold. Valid values:
- GreaterThanOrEqualToThreshold: greater than or equal to the threshold
- GreaterThanThreshold: greater than the threshold
- LessThanOrEqualToThreshold: less than or equal to the threshold
- LessThanThreshold: less than the threshold
- NotEqualToThreshold: not equal to the threshold
- GreaterThanYesterday: greater than the metric value at the same time yesterday
- LessThanYesterday: less than the metric value at the same time yesterday
- GreaterThanLastWeek: greater than the metric value at the same time last week
- LessThanLastWeek: less than the metric value at the same time last week
- GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle
- LessThanLastPeriod: less than the metric value in the last monitoring cycle
| GreaterThanOrEqualToThreshold |
Threshold | string | | 90 |
ExpressionListJoin | string | The relationship between the trigger conditions for multiple metrics. Valid values:
&& : An alert is triggered only if all metrics meet the trigger conditions. An alert is triggered only if the results of all expressions specified in the ExpressionList parameter are true .
|| : An alert is triggered if one of the metrics meets the trigger conditions.
| || |
ExpressionRaw | string | The trigger conditions that are created by using expressions. You can use expressions to create trigger conditions in the following scenarios:
- Set an alert blacklist for specific resources. For example, if you specify
$instanceId != 'i-io8kfvcpp7x5****' ``&&`` $Average > 50 , no alert is triggered when the average metric value of the i-io8kfvcpp7x5**** instance exceeds 50.
- Set a special alert threshold for a specified instance in the rule. For example, if you specify
$Average > ($instanceId == 'i-io8kfvcpp7x5****'? 80: 50) , an alert is triggered when the average metric value of the i-io8kfvcpp7x5**** instance exceeds 80 or the average metric value of other instances exceeds 50.
- Limit the number of instances whose metric values exceed the threshold. For example, if you specify
count($Average > 20) > 3 , an alert is triggered only when the number of instances whose average metric value exceeds 20 exceeds three.
| $Average > ($instanceId == 'i-io8kfvcpp7x5****'? 80: 50) |
Times | integer | The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications. | 3 |
Labels | array<object> | The tags of the alert rule. | |
| object | | |
Key | string | The tag key of the alert rule. | cmsRuleKey |
Value | string | The tag value of the alert rule. | cmsRuleValue |
Prometheus | object | The Prometheus alerts.
Note
This parameter is required only if you create a Prometheus alert rule for Hybrid Cloud Monitoring.
| |
PromQL | string | The PromQL query statement.
Note
The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
| CpuUsage{instanceId="xxxx"}[1m]>90 |
Level | string | The alert level. Valid values:
| Critical |
Times | long | The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications. | 3 |
Annotations | array<object> | The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
Note
This parameter is equivalent to the annotations parameter of open source Prometheus.
| |
| object | | |
Key | string | The key of the annotation. | summary |
Value | string | The value of the annotation. | {{ $labels.instance }} CPU usage above 10% {current value: {{ humanizePercentage $value }} } |