Creates a process monitoring task for an application group.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
GroupId | string | Yes | The ID of the application group. For more information about how to obtain the ID of an application group, see DescribeMonitorGroups . | 123456 |
ProcessName | string | Yes | The process name. | test1 |
MatchExpressFilterRelation | string | No | The logical operator used between conditional expressions that are used to match instances. Valid values:
| and |
MatchExpress | object [] | No | The expressions used to match instances. Valid values of N: 1 to 3. | |
Value | string | No | The keyword used to match the instance name. Valid values of N: 1 to 3. | portalHost |
Name | string | No | The criteria based on which the instances are matched. Valid values of N: 1 to 3. Note
Set the value to name. The value name indicates that the instances are matched based on the instance name.
| name1 |
Function | string | No | The matching condition. Valid values:
Valid values of N: 1 to 3. | startWith |
AlertConfig | object [] | Yes | The alert rule configurations. Valid values of N: 1 to 3. | |
SilenceTime | string | No | 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. Valid values of N: 1 to 3. Note
Only one alert notification is sent during each mute period even if the metric value exceeds the alert threshold several times.
| 86400 |
ComparisonOperator | string | Yes | The operator that is used to compare the metric value with the threshold. Valid values:
Valid values of N: 1 to 3. | GreaterThanOrEqualToThreshold |
Webhook | string | No | The callback URL. Valid values of N: 1 to 3. | http://www.aliyun.com |
Times | string | Yes | The number of times for which the threshold can be consecutively exceeded. Default value: 3. Valid values of N: 1 to 3. Note
An alert is triggered only if the number of times for which the threshold can be consecutively exceeded is reached.
| 3 |
EscalationsLevel | string | Yes | The alert level. Valid values:
Valid values of N: 1 to 3. | warn |
EffectiveInterval | string | No | The time period during which the alert rule is effective. Valid values of N: 1 to 3. | 00:00-23:59 |
NoEffectiveInterval | string | No | This parameter is deprecated. | 00:00-23:59 |
Threshold | string | Yes | The alert threshold. Valid values of N: 1 to 3. Unit: cores. | 5 |
Statistics | string | Yes | The statistical method for alerts. Valid values of N: 1 to 3. Note
Set the value to Average.
| Average |
TargetList | object [] | No | The alert triggers. | |
Id | string | No | The ID of the resource for which alerts are triggered. For information about how to obtain the ID of a resource for which alerts are triggered, see DescribeMetricRuleTargets . | 1 |
Arn | string | No | The Alibaba Cloud Resource Name (ARN) of the resource. For information about how to obtain the ARN of a resource, see DescribeMetricRuleTargets . Format:
| acs:mns:cn-hangzhou:120886317861****:/queues/test/message |
Level | string | No | The alert level. Valid values:
| ["INFO", "WARN", "CRITICAL"] |
JsonParams | string | No | The parameters of the alert callback. Specify the parameters in the JSON format. | {"customField1":"value1","customField2":"$.name"} |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"Message": "The Request is not authorization.",
"RequestId": "3F6150F9-45C7-43F9-9578-A58B2E726C90",
"Success": true,
"Resource": {
"GroupProcessId": "7F2B0024-4F21-48B9-A764-211CEC48****"
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ParameterInvalid | %s | - |
403 | AccessForbidden | User not authorized to operate on the specified resource. | - |
404 | ResourceNotFound | The specified resource is not found. | The specified resource is not found. |
500 | InternalError | The request processing has failed due to some unknown error. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-03-20 | The Error code has changed. The response structure of the API has changed | see changesets | ||||||||||||
| ||||||||||||||
2022-08-05 | The Error code has changed | see changesets | ||||||||||||
|