Mengkueri informasi tentang tugas yang dipicu peristiwa untuk membantu Anda memahami konfigurasi dan tren data pemantauan dari tugas yang dipicu peristiwa yang ada, mendeteksi pengecualian sumber daya sistem secara real-time, dan memastikan stabilitas serta keandalan sistem.
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 peristiwa berada. |
cn-qingdao |
| ScalingGroupId |
string |
No |
ID grup penskalaan yang terkait dengan tugas yang dipicu peristiwa. |
asg-bp18p2yfxow2dloq**** |
| AlarmTaskId |
string |
No |
ID tugas yang dipicu peristiwa. |
asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** |
| State |
string |
No |
Status tugas yang dipicu peristiwa. Nilai yang valid:
|
OK |
| IsEnable |
boolean |
No |
Menentukan apakah tugas yang dipicu peristiwa diaktifkan. Nilai yang valid:
|
true |
| MetricType |
string |
No |
Jenis metrik pemantauan. Nilai yang valid:
|
true |
| MetricName |
string |
No |
Nama metrik pemantauan. |
CpuUtilization |
| PageSize |
integer |
No |
Jumlah entri per halaman untuk kueri paginasi. Nilai maksimum: 50. Nilai default: 10. |
10 |
| PageNumber |
integer |
No |
Nomor halaman dari daftar aturan penskalaan. Halaman dimulai dari halaman 1. Nilai default: 1. |
1 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Struktur respons. |
||
| 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 peristiwa. |
2 |
| AlarmList |
array<object> |
Daftar tugas yang dipicu peristiwa. |
|
|
array<object> |
Daftar tugas yang dipicu peristiwa. |
||
| AlarmTaskId |
string |
ID tugas yang dipicu peristiwa. |
asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1**** |
| MetricName |
string |
Nama metrik pemantauan. Nilai yang valid:
Untuk informasi lebih lanjut, lihat Tugas yang dipicu peristiwa untuk pemantauan sistem. |
CpuUtilization |
| EvaluationCount |
integer |
Jumlah kali berturut-turut ekspresi ambang batas harus terpenuhi sebelum aturan penskalaan dipicu. Misalnya, rata-rata utilisasi CPU harus lebih besar dari atau sama dengan 80% selama tiga periode statistik berturut-turut. |
3 |
| State |
string |
Status tugas yang dipicu peristiwa. Nilai yang valid:
|
ALARM |
| Period |
integer |
Periode statistik untuk data metrik pemantauan, dalam detik. Nilai yang valid: Catatan
Hanya grup penskalaan bertipe ECS yang mendukung periode statistik 15 detik. |
300 |
| ScalingGroupId |
string |
ID grup penskalaan yang terkait dengan tugas yang dipicu peristiwa. |
asg-bp18p2yfxow2dloq**** |
| ComparisonOperator |
string |
Operator perbandingan antara nilai statistik dan ambang batas metrik pemantauan. Operator ini menentukan kondisi di mana nilai statistik memenuhi ambang batas. Nilai yang valid:
|
>= |
| Effective |
string |
Periode efektif tugas yang dipicu peristiwa. |
Test |
| Description |
string |
Deskripsi tugas yang dipicu peristiwa. |
Test alarm task. |
| MetricType |
string |
Jenis metrik pemantauan. Nilai yang valid:
|
system |
| Name |
string |
Nama tugas yang dipicu peristiwa. |
TestAlarmTask |
| Threshold |
number |
Ambang batas metrik pemantauan. Aturan penskalaan dipicu ketika ekspresi ambang batas terpenuhi selama jumlah kali yang ditentukan. |
80.0 |
| Enable |
boolean |
Menunjukkan apakah tugas yang dipicu peristiwa diaktifkan. Nilai yang valid:
|
true |
| Statistics |
string |
Metode yang digunakan untuk mengagregasi data metrik pemantauan. Nilai yang valid:
|
Average |
| Dimensions |
array<object> |
Informasi dimensi yang terkait dengan metrik pemantauan. |
|
|
object |
Informasi dimensi yang terkait dengan metrik pemantauan. |
||
| DimensionKey |
string |
The dimension key of the metric. Valid values:
|
device |
| DimensionValue |
string |
The dimension value of the metric. The value of DimensionValue varies based on the value of DimensionKey.
|
eth0 |
| AlarmActions |
array |
Daftar pengidentifikasi unik dari aturan penskalaan yang terkait dengan tugas yang dipicu peristiwa. |
|
|
string |
Daftar pengidentifikasi unik dari aturan penskalaan yang terkait dengan tugas yang dipicu peristiwa. |
ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh**** |
|
| Expressions |
array<object> |
Informasi tentang aturan peringatan multi-metrik. |
|
|
object |
Informasi tentang aturan peringatan multi-metrik. |
||
| MetricName |
string |
The name of the metric that is specified in the multi-metric alert rule. Valid values:
For more information, see Event-triggered tasks of the system monitoring type. |
CpuUtilization |
| ComparisonOperator |
string |
The operator that is used to compare the metric value and the threshold.
|
>= |
| Period |
integer |
The statistical period of the metric data in the multi-metric alert rule. Unit: seconds. Valid values:
Catatan
If your scaling group is of the ECS type and the event-triggered task that is associated with your scaling group monitors CloudMonitor metrics, you can set Period to 15. In most cases, the name of a CloudMonitor metric contains Agent. |
900 |
| Statistics |
string |
The method that is used to aggregate statistics about the metrics in the multi-metric alert rule. Valid values:
|
Average |
| Threshold |
number |
The threshold of the metric value. If the threshold is reached the specified number of times within the specified period, a scaling rule is executed. |
40.0 |
| ExpressionsLogicOperator |
string |
Operator logika antara kondisi peringatan multi-metrik. Nilai yang valid:
|
&& |
| HybridMonitorNamespace |
string |
ID repositori metrik pemantauan Hybrid Cloud Monitoring. Untuk mengelola repositori metrik, lihat Mengelola repositori metrik. |
aliyun-test |
| HybridMetrics |
array<object> |
Pengaturan metrik pemantauan Hybrid Cloud Monitoring. Untuk informasi lebih lanjut tentang cara mengonfigurasi pengaturan ini, lihat Menggunakan aturan pelacakan target kustom berbasis formula. |
|
|
array<object> |
|||
| Id |
string |
The reference ID of the metric in the metric expression. |
a |
| Expression |
string |
The metric expression that consists of multiple Hybrid Cloud Monitoring metrics. It calculates a result used to trigger scaling events. The expression is written in Reverse Polish Notation (RPN) format and supports only the following operators: |
(a+b)/2 |
| MetricName |
string |
The name of the Hybrid Cloud Monitoring metric. |
AliyunSmq_NumberOfMessagesVisible |
| Statistic |
string |
The statistical method of the metric value. Valid values:
|
Average |
| Dimensions |
array<object> |
The metric dimensions. This parameter is used to specify the monitored resources. |
|
|
object |
|||
| DimensionKey |
string |
The key of the metric dimension. |
queue |
| DimensionValue |
string |
The key of the metric dimension. |
testQueue |
| PromQL |
string |
Pernyataan kueri PromQL untuk 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": [
{
"AlarmTaskId": "asg-bp1hvbnmkl10vll5****_f95ce797-dc2e-4bad-9618-14fee7d1****",
"MetricName": "CpuUtilization",
"EvaluationCount": 3,
"State": "ALARM",
"Period": 300,
"ScalingGroupId": "asg-bp18p2yfxow2dloq****",
"ComparisonOperator": ">=",
"Effective": "Test",
"Description": "Test alarm task.",
"MetricType": "system",
"Name": "TestAlarmTask",
"Threshold": 80,
"Enable": true,
"Statistics": "Average",
"Dimensions": [
{
"DimensionKey": "device",
"DimensionValue": "eth0"
}
],
"AlarmActions": [
"ari:acs:ess:cn-hangzhou:1406926474****:scalingrule/asr-bp163l21e07uh****"
],
"Expressions": [
{
"MetricName": "CpuUtilization",
"ComparisonOperator": ">=",
"Period": 900,
"Statistics": "Average",
"Threshold": 40
}
],
"ExpressionsLogicOperator": "&&",
"HybridMonitorNamespace": "aliyun-test",
"HybridMetrics": [
{
"Id": "a",
"Expression": "(a+b)/2",
"MetricName": "AliyunSmq_NumberOfMessagesVisible",
"Statistic": "Average",
"Dimensions": [
{
"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.