Mengkueri informasi tentang tugas yang dipicu oleh peristiwa.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:DescribeAlarms |
get |
*ScalingGroup
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah tempat tugas yang dipicu oleh peristiwa berada. |
cn-qingdao |
| ScalingGroupId |
string |
No |
ID grup penskalaan yang terkait dengan tugas yang dipicu oleh peristiwa. |
asg-bp18p2yfxow2dloq**** |
| AlarmTaskId |
string |
No |
ID tugas yang dipicu oleh peristiwa. |
asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** |
| State |
string |
No |
Status tugas yang dipicu oleh peristiwa. Nilai yang valid:
|
OK |
| IsEnable |
boolean |
No |
Menentukan apakah tugas yang dipicu oleh peristiwa diaktifkan. Nilai yang valid:
|
true |
| MetricType |
string |
No |
Jenis metrik pemantauan. Nilai yang valid:
|
system |
| MetricName |
string |
No |
Nama metrik pemantauan. |
CpuUtilization |
| PageSize |
integer |
No |
Jumlah entri per halaman. Nilai maksimum: 50. Nilai default: 10. |
10 |
| PageNumber |
integer |
No |
Nomor halaman daftar tugas yang dipicu oleh peristiwa. Nilai minimum: 1. Nilai default: 1. |
1 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Informasi tentang tugas yang dipicu oleh peristiwa. |
||
| PageSize |
integer |
Jumlah entri per halaman. |
10 |
| RequestId |
string |
ID permintaan. |
871C7C53-34A4-45AA-8C14-4B72FA6A**** |
| PageNumber |
integer |
Nomor halaman saat ini. |
1 |
| TotalCount |
integer |
Jumlah total tugas yang dipicu oleh peristiwa. |
2 |
| AlarmList |
object |
||
| Alarm |
array<object> |
Daftar tugas yang dipicu oleh peristiwa. |
|
|
array<object> |
Daftar tugas yang dipicu oleh peristiwa. |
||
| AlarmTaskId |
string |
The ID of the event-triggered task. |
asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** |
| MetricName |
string |
The name of the monitoring metric. Valid values:
For more information, see System monitoring event-triggered tasks. |
CpuUtilization |
| EvaluationCount |
integer |
The number of consecutive times that the threshold expression must be met before the scaling rule is triggered. For example, the average CPU utilization must be greater than or equal to 80% for three consecutive statistical periods. |
3 |
| State |
string |
The state of the event-triggered task. Valid values:
|
ALARM |
| Period |
integer |
The statistical period for the monitoring metric data, in seconds. Valid values: Catatan
Only ECS-type scaling groups support a 15-second statistical period. |
300 |
| ScalingGroupId |
string |
The ID of the scaling group associated with the event-triggered task. |
asg-bp18p2yfxow2dloq**** |
| ComparisonOperator |
string |
The comparison operator between the statistical value and the threshold of the monitoring metric. This operator specifies the condition under which the alert is triggered. Valid values:
|
>= |
| Effective |
string |
The effective period of the event-triggered task. |
* * * * * ? |
| Description |
string |
The description of the event-triggered task. |
Test alarm task. |
| MetricType |
string |
The type of the monitoring metric. Valid values:
|
system |
| Name |
string |
The name of the event-triggered task. |
TestAlarmTask |
| Threshold |
number |
The threshold of the monitoring metrics. The scaling rule is triggered when the threshold expression is met for the specified number of times. |
80.0 |
| Enable |
boolean |
Indicates whether the event-triggered task is enabled. Valid values:
|
true |
| Statistics |
string |
The method used to aggregate the monitoring metric data. Valid values:
|
Average |
| Dimensions |
object |
||
| Dimension |
array<object> |
The dimension information associated with the monitoring metric. |
|
|
object |
The dimension information associated with the monitoring metric. |
||
| DimensionKey |
string |
The key of the dimension information associated with the monitoring metric. Valid values:
|
device |
| DimensionValue |
string |
The value of the dimension information associated with the monitoring metric. The valid values depend on the dimension key.
|
eth0 |
| AlarmActions |
object |
||
| AlarmAction |
array |
The list of unique identifiers of the scaling rules associated with the event-triggered task. |
|
|
string |
The list of unique identifiers of the scaling rules associated with the event-triggered task. |
ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh**** |
|
| Expressions |
object |
||
| Expression |
array<object> |
The information about multi-metric alert rules. |
|
|
object |
The information about multi-metric alert rules. |
||
| MetricName |
string |
The name of the monitoring metric in the multi-metric alert rule. Valid values:
For more information, see System monitoring event-triggered nodes. |
CpuUtilization |
| ComparisonOperator |
string |
The comparison operator between the statistical value and the threshold of the monitoring metric in the multi-metric alert rule. This operator specifies the condition under which the alert is triggered. Valid values:
Default value: >=. |
>= |
| Period |
integer |
The statistical period for the monitoring metric data in the multi-metric alert rule, in seconds. Valid values: Catatan
Only ECS-type scaling groups support a 15-second statistical period. |
900 |
| Statistics |
string |
The method used to aggregate the monitoring metric data in the multi-metric alert rule. Valid values:
|
Average |
| Threshold |
number |
The threshold of the monitoring metrics in the multi-metric alert rule. The scaling rule is triggered when the threshold expression is met for the specified number of times. |
40.0 |
| ExpressionsLogicOperator |
string |
The logical operator between multi-metric alert conditions. Valid values:
|
&& |
| HybridMonitorNamespace |
string |
The ID of the Hybrid Cloud Monitoring monitoring metrics repository. To manage metric repositories, see Manage metric repositories. |
aliyun-test |
| HybridMetrics |
object |
||
| HybridMetric |
array<object> |
The Hybrid Cloud Monitoring monitoring metrics settings. For more information, see Use formula-based custom target tracking rules. |
|
|
array<object> |
|||
| Id |
string |
The reference ID of the metric in the formula expression. |
a |
| Expression |
string |
The formula expression for multiple Hybrid Cloud Monitoring metrics. The calculation result of the expression is used to trigger scaling activities. The expression must comply with the Reverse Polish Notation (RPN) specification and supports only the |
(a+b)/2 |
| MetricName |
string |
The name of the monitoring metrics in the Hybrid Cloud Monitoring metric repository. |
AliyunSmq_NumberOfMessagesVisible |
| Statistic |
string |
The aggregation method for the metric. Valid values:
|
Average |
| Dimensions |
object |
||
| Dimension |
array<object> |
The metric dimension. Specifies the resource to be monitored by the metric. |
|
|
object |
|||
| DimensionKey |
string |
The key of the metric dimension. |
queue |
| DimensionValue |
string |
The value of the metric dimension. |
testQueue |
| PromQL |
string |
The PromQL query statement for Hybrid Cloud Monitoring. |
(avg(last_over_time(AliyunMnsnew_ActiveMessages{region='cn-hangzhou',userId='123456****',queue='testQueue'}[900s])) by (userId))/(avg(last_over_time(AliyunEss_RunningInstanceCount{instanceId='asg-bp1****'}[900s])) by (userId) != 0) |
Contoh
Respons sukses
JSONformat
{
"PageSize": 10,
"RequestId": "871C7C53-34A4-45AA-8C14-4B72FA6A****",
"PageNumber": 1,
"TotalCount": 2,
"AlarmList": {
"Alarm": [
{
"AlarmTaskId": "asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****",
"MetricName": "CpuUtilization",
"EvaluationCount": 3,
"State": "ALARM",
"Period": 300,
"ScalingGroupId": "asg-bp18p2yfxow2dloq****",
"ComparisonOperator": ">=",
"Effective": "* * * * * ?",
"Description": "Test alarm task.",
"MetricType": "system",
"Name": "TestAlarmTask",
"Threshold": 80,
"Enable": true,
"Statistics": "Average",
"Dimensions": {
"Dimension": [
{
"DimensionKey": "device",
"DimensionValue": "eth0"
}
]
},
"AlarmActions": {
"AlarmAction": [
"ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh****"
]
},
"Expressions": {
"Expression": [
{
"MetricName": "CpuUtilization",
"ComparisonOperator": ">=",
"Period": 900,
"Statistics": "Average",
"Threshold": 40
}
]
},
"ExpressionsLogicOperator": "&&",
"HybridMonitorNamespace": "aliyun-test",
"HybridMetrics": {
"HybridMetric": [
{
"Id": "a",
"Expression": "(a+b)/2",
"MetricName": "AliyunSmq_NumberOfMessagesVisible",
"Statistic": "Average",
"Dimensions": {
"Dimension": [
{
"DimensionKey": "queue",
"DimensionValue": "testQueue"
}
]
}
}
]
},
"PromQL": "(avg(last_over_time(AliyunMnsnew_ActiveMessages{region='cn-hangzhou',userId='123456****',queue='testQueue'}[900s])) by (userId))/(avg(last_over_time(AliyunEss_RunningInstanceCount{instanceId='asg-bp1****'}[900s])) by (userId) != 0)"
}
]
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.