Modifies a process monitoring task for an application group.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyGroupMonitoringAgentProcess

The operation that you want to perform. Set the value to ModifyGroupMonitoringAgentProcess.

Id String Yes 92E3065F-0980-4E31-9AA0-BA6****

The ID of the process monitoring task.

GroupId String Yes 6780****

The ID of the application group.

MatchExpressFilterRelation String No and

The logical operator used between conditional expressions that are used to match instances. Valid values:

  • all
  • and
  • or
AlertConfig.N.SilenceTime String No 86400

The mute period during which new alerts are not sent even if the trigger conditions are met. Valid values of N: 1 to 200.

Unit: seconds. Minimum value: 3600, which is equivalent to one hour. Default value: 86400, which is equivalent to one day.

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 comparison operator that is used to compare the metric value with the threshold. Valid values of N: 1 to 200. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold
  • GreaterThanThreshold: greater than the threshold
  • LessThanOrEqualToThreshold: less than or equal to the threshold
  • LessThanThreshold: less than the threshold.
  • NotEqualToThreshold: not equal to the threshold
  • GreaterThanYesterday: greater than the metric value at the same time yesterday.
  • LessThanYesterday: less than the metric value at the same time yesterday
  • GreaterThanLastWeek: greater than the metric value at the same time last week
  • LessThanLastWeek: less than the metric value at the same time last week
  • GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle
  • LessThanLastPeriod: less than the metric value in the last monitoring cycle
AlertConfig.N.Webhook String No http://www.aliyun.com

The callback URL to which a POST request is sent when an alert is triggered based on the alert rule. Valid values of N: 1 to 200.

AlertConfig.N.Times String Yes 3

The number of times for which the threshold can be consecutively exceeded. Valid values of N: 1 to 200. Default value: 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 level of the alert. Valid values of N: 1 to 200. Valid values:

  • critical (default value): critical
  • warn: warning
  • info: information
AlertConfig.N.EffectiveInterval String No 00:00-22:59

The time period during which the alert rule is effective. Valid values of N: 1 to 200.

AlertConfig.N.NoEffectiveInterval String No 23:00-23:59

The time period during which the alert rule is ineffective. Valid values of N: 1 to 200.

AlertConfig.N.Threshold String Yes 5

The alert threshold. Valid values of N: 1 to 200.

AlertConfig.N.Statistics String No Average

The statistical aggregation method that is used to calculate the metric values. Valid values of N: 1 to 200.

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: acs:{Service name abbreviation}:{regionId}:{userId}:/{Resource type}/{Resource name}/message. Example: acs:mns:cn-hangzhou:120886317861****:/queues/test123/message. Fields:

  • {Service name abbreviation}: the abbreviation of the service name. Valid value: mns.
  • {userId}: the ID of the Alibaba Cloud account.
  • {regionId}: the region ID of the message queue or topic.
  • {Resource type}: the type of the resource for which alerts are triggered. Valid values: - **queues** - **topics** {Resource name}: the name of the resource. - If the resource type is set to **queues**, the resource name is the name of the message queue. - If the resource type is set to **topics**, the resource name is the name of the topic.
AlertConfig.N.TargetList.N.Level String No ["INFO", "WARN", "CRITICAL"]

The level of the alert. Valid values:

  • INFO: information
  • WARN: warning
  • CRITICAL: critical
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 HTTP status code.

Note The status code 200 indicates that the call was successful.
Message String The Request is not authorization.

The error message.

RequestId String 7985D471-3FA8-4EE9-8F4B-45C19DF3D36F

The ID of the request.

Success Boolean true

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ModifyGroupMonitoringAgentProcess
&AlertConfig.1.ComparisonOperator=GreaterThanOrEqualToThreshold
&AlertConfig.1.EscalationsLevel=warn
&AlertConfig.1.Threshold=5
&AlertConfig.1.Times=3
&GroupId=6780****
&Id=92E3065F-0980-4E31-9AA0-BA6****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyGroupMonitoringAgentProcess>
		<RequestId>7985D471-3FA8-4EE9-8F4B-45C19DF3D36F</RequestId>
		<Success>true</Success>
		<Code>200</Code>
</ModifyGroupMonitoringAgentProcess>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "7985D471-3FA8-4EE9-8F4B-45C19DF3D36F",
  "Success" : true,
  "Code" : 200
}

Error codes

HTTP status code Error code Error message Description
404 ResourceNotFound The specified resource is not found. The error message returned because the specified resource is not found.

For a list of error codes, visit the API Error Center.