Creates a process monitoring task for an application group.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateGroupMonitoringAgentProcess | The operation that you want to perform. Set the value to CreateGroupMonitoringAgentProcess. |
GroupId | String | Yes | 3607**** | The ID of the application group. For information about how to obtain the ID of an application group, see DescribeMonitorGroups. |
ProcessName | String | Yes | Process_Java | The process name. |
MatchExpressFilterRelation | String | No | and | The logical operator used between conditional expressions that are used to match instances. Valid values:
|
MatchExpress.N.Value | String | No | portalHost | The keyword used to match the instance name. Valid values of N: 1 to 3. |
MatchExpress.N.Name | String | No | name1 | The criteria based on which the instances are matched. Valid values of N: 1 to 3. Note Instances can be matched based on only instance names. |
MatchExpress.N.Function | String | No | startWith | The matching condition. Valid values:
Valid values of N: 1 to 3. |
AlertConfig.N.SilenceTime | String | No | 86400 | 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 1 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 a mute period even if the metric value exceeds the alert threshold during consecutive checks. |
AlertConfig.N.ComparisonOperator | String | Yes | GreaterThanOrEqualToThreshold | The operator that is used to compare the metric value with the threshold. Valid values:
Valid values of N: 1 to 3. |
AlertConfig.N.Webhook | String | No | https://www.aliyun.com | The callback URL. Valid values of N: 1 to 3. |
AlertConfig.N.Times | String | Yes | 3 | The number of times for which the threshold can be consecutively exceeded. Default value: 3. Valid values of N: 1 to 3. Note A metric triggers an alert only after the metric value reaches the threshold consecutively for the specified times. |
AlertConfig.N.EscalationsLevel | String | Yes | warn | The alert level. Valid values:
Valid values of N: 1 to 3. |
AlertConfig.N.EffectiveInterval | String | No | 07:00-22:59 | The time period during which the alert rule is effective. Valid values of N: 1 to 3. |
AlertConfig.N.NoEffectiveInterval | String | No | 23:00-06:59 | The time period during which the alert rule is ineffective. Valid values of N: 1 to 3. |
AlertConfig.N.Threshold | String | Yes | 5 | The alert threshold. Valid values of N: 1 to 3. |
AlertConfig.N.Statistics | String | Yes | Average | The statistical aggregation method that is used to calculate the metric values. Valid values of N: 1 to 3. Note Set the value to Average. |
AlertConfig.N.TargetList.N.Id | String | No | 1 | 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. |
AlertConfig.N.TargetList.N.Arn | String | No | acs:mns:cn-hangzhou:120886317861****:/queues/test/message | The Alibaba Cloud Resource Name (ARN) of the resource. For information about how to obtain the ARN of a resource, see DescribeMetricRuleTargets. Format:
|
AlertConfig.N.TargetList.N.Level | String | No | ["INFO", "WARN", "CRITICAL"] | The alert level. Valid values:
|
AlertConfig.N.TargetList.N.JsonParams | String | No | {"customField1":"value1","customField2":"$.name"} | The parameters of the alert callback. The parameters are in the JSON format. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 | The status code. Note The status code 200 indicates that the request was successful. |
Message | String | The Request is not authorization. | The error message. |
RequestId | String | 718FEA81-64C3-4F23-8F90-0531F7489FC1 | The request ID. |
Success | Boolean | true | Indicates whether the request was successful. Valid values:
|
Resource | Object | The group process information. | |
GroupProcessId | String | 7F2B0024-4F21-48B9-A764-211CEC48**** | The ID of the group process. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateGroupMonitoringAgentProcess
&AlertConfig.1.ComparisonOperator=GreaterThanOrEqualToThreshold
&AlertConfig.1.EscalationsLevel=warn
&AlertConfig.1.Statistics=Average
&AlertConfig.1.Threshold=5
&AlertConfig.1.Times=3
&GroupId=3607****
&ProcessName=Process_Java
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateGroupMonitoringAgentProcessResponse>
<Code>200</Code>
<RequestId>718FEA81-64C3-4F23-8F90-0531F7489FC1</RequestId>
<Success>true</Success>
<Resource>
<GroupProcessId>7F2B0024-4F21-48B9-A764-211CEC48****</GroupProcessId>
</Resource>
</CreateGroupMonitoringAgentProcessResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : "200",
"RequestId" : "718FEA81-64C3-4F23-8F90-0531F7489FC1",
"Success" : true,
"Resource" : {
"GroupProcessId" : "7F2B0024-4F21-48B9-A764-211CEC48****"
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | ResourceNotFound | The specified resource is not found. | The specified resource is not found. |
For a list of error codes, see Service error codes.