Mengambil tugas pemantauan proses untuk sebuah grup aplikasi.
Deskripsi operasi
Anda dapat membuat tugas pemantauan proses untuk memantau seluruh atau instans Elastic Compute Service (ECS) tertentu dalam sebuah grup aplikasi dan mengonfigurasi aturan peringatan untuk tugas pemantauan proses tersebut.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeGroupMonitoringAgentProcess |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| GroupId |
string |
Yes |
ID grup aplikasi. |
12345 |
| ProcessName |
string |
No |
Nama proses. |
sshd |
| PageNumber |
integer |
No |
Nomor halaman. Nilai default: 1 |
1 |
| PageSize |
integer |
No |
Jumlah entri per halaman. Nilai default: 10. |
10 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter respons. |
||
| RequestId |
string |
ID permintaan. |
7985D471-3FA8-4EE9-8F4B-45C19DF3D36F |
| Success |
boolean |
Menunjukkan apakah permintaan berhasil. Nilai yang valid: Nilai yang valid: true dan false. |
true |
| Code |
string |
Kode status HTTP. Catatan
Kode status 200 menunjukkan bahwa permintaan berhasil. |
200 |
| Message |
string |
Pesan kesalahan. |
The Request is not authorization. |
| PageNumber |
string |
Nomor halaman. Nilai default: 1 |
1 |
| PageSize |
string |
Jumlah entri per halaman. Nilai default: 10. |
10 |
| Total |
string |
Jumlah total entri yang dikembalikan. |
28 |
| Processes |
object |
||
| Process |
array<object> |
Tugas pemantauan proses. |
|
|
array<object> |
Tugas pemantauan proses. |
||
| ProcessName |
string |
The process name. |
sshd |
| MatchExpressFilterRelation |
string |
The logical operator used between conditional expressions that are used to match instances. Valid values:
|
and |
| GroupId |
string |
The ID of the application group. |
12345 |
| Id |
string |
The ID of the process monitoring task. |
3F6150F9-45C7-43F9-9578-A58B2E72**** |
| MatchExpress |
object |
||
| MatchExpress |
array<object> |
The matching conditions. Catatan
Only the instances that meet the conditional expressions are monitored by the process monitoring task. |
|
|
object |
|||
| Value |
string |
The keyword used to match the instance name. |
portalHost |
| Name |
string |
The criteria based on which the instances are matched. Catatan
Set the value to |
name |
| Function |
string |
The matching condition. Valid values:
Catatan
The matched instances are monitored by the process monitoring task. |
all |
| AlertConfig |
object |
||
| AlertConfig |
array<object> |
The alert rule configurations. |
|
|
array<object> |
The alert rule configuration. |
||
| ComparisonOperator |
string |
The comparison operator that is used to compare the metric value with the threshold. Valid values:
|
GreaterThanOrEqualToThreshold |
| SilenceTime |
string |
The mute period during which new alert notifications are not sent even if the trigger conditions are met. Unit: seconds. Minimum value: 3600, which is equivalent to one hour. Default value: 86400, which is equivalent to one day. Catatan
Only one alert notification is sent during each mute period even if the metric value exceeds the alert threshold several times. |
86400 |
| Webhook |
string |
The callback URL to which a POST request is sent when an alert is triggered based on the alert rule. |
http://www.aliyun.com |
| Times |
string |
The number of times for which the threshold can be consecutively exceeded. Catatan
A metric triggers an alert only after the metric value reaches the threshold consecutively for the specified times. |
3 |
| EscalationsLevel |
string |
The level of the alert. Valid values:
|
warn |
| NoEffectiveInterval |
string |
The time period during which the alert rule is ineffective. |
00:00-23:59 |
| EffectiveInterval |
string |
The time period during which the alert rule is effective. |
00:00-23:59 |
| Threshold |
string |
The alert threshold. |
5 |
| Statistics |
string |
The method used to calculate metric values that trigger alerts. |
Average |
| TargetList |
object |
||
| Target |
array<object> |
The resources for which alerts are triggered. |
|
|
object |
The resource for which alerts are triggered. |
||
| Id |
string |
The ID of the resource for which alerts are triggered. |
123 |
| Arn |
string |
The Alibaba Cloud Resource Name (ARN) of the resource. Format: acs:{Service name abbreviation}:{regionId}:{userId}:/{Resource type}/{Resource name}/message. Example: acs:mns:cn-hangzhou:120886317861****:/queues/test123/message. Fields:
|
acs:mns:cn-hangzhou:120886317861****:/queues/test/message |
| Level |
string |
The alert level. Valid values:
|
CRITICAL |
| JsonParmas |
string |
The parameters of the alert callback. The parameters are in the JSON format. |
{"customField1":"value1","customField2":"$.name"} |
Contoh
Respons sukses
JSONformat
{
"RequestId": "7985D471-3FA8-4EE9-8F4B-45C19DF3D36F",
"Success": true,
"Code": "200",
"Message": "The Request is not authorization.",
"PageNumber": "1",
"PageSize": "10",
"Total": "28",
"Processes": {
"Process": [
{
"ProcessName": "sshd",
"MatchExpressFilterRelation": "and",
"GroupId": "12345",
"Id": "3F6150F9-45C7-43F9-9578-A58B2E72****",
"MatchExpress": {
"MatchExpress": [
{
"Value": "portalHost",
"Name": "name",
"Function": "all"
}
]
},
"AlertConfig": {
"AlertConfig": [
{
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"SilenceTime": "86400",
"Webhook": "http://www.aliyun.com",
"Times": "3",
"EscalationsLevel": "warn",
"NoEffectiveInterval": "00:00-23:59",
"EffectiveInterval": "00:00-23:59",
"Threshold": "5",
"Statistics": "Average",
"TargetList": {
"Target": [
{
"Id": "123",
"Arn": "acs:mns:cn-hangzhou:120886317861****:/queues/test/message",
"Level": "CRITICAL",
"JsonParmas": "{\"customField1\":\"value1\",\"customField2\":\"$.name\"}"
}
]
}
}
]
}
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterInvalid | Illegal parameters. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | |
| 404 | ResourceNotFound | The specified resource is not found. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.