Creates 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

ParameterTypeRequiredExampleDescription
ActionStringYesCreateGroupMonitoringAgentProcess

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

GroupIdStringYes3607****

The ID of the application group.

For information about how to obtain the ID of an application group, see DescribeMonitorGroups.

ProcessNameStringYesProcess_Java

The process name.

MatchExpressFilterRelationStringNoand

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

  • all
  • and
  • or
MatchExpress.N.ValueStringNoportalHost

The keyword used to match the instance name.

Valid values of N: 1 to 3.

MatchExpress.N.NameStringNoname1

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.FunctionStringNostartWith

The matching condition. Valid values:

  • all (default): matches all
  • startWith: starts with a prefix
  • endWith: ends with a suffix
  • contains: contains
  • notContains: does not contain
  • equals: equals

Valid values of N: 1 to 3.

AlertConfig.N.SilenceTimeStringNo86400

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.ComparisonOperatorStringYesGreaterThanOrEqualToThreshold

The operator that is used to compare the metric value with the threshold. 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

Valid values of N: 1 to 3.

AlertConfig.N.WebhookStringNohttps://www.aliyun.com

The callback URL.

Valid values of N: 1 to 3.

AlertConfig.N.TimesStringYes3

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.EscalationsLevelStringYeswarn

The alert level. Valid values:

  • critical (default): critical
  • warn: warning
  • info: information

Valid values of N: 1 to 3.

AlertConfig.N.EffectiveIntervalStringNo07:00-22:59

The time period during which the alert rule is effective.

Valid values of N: 1 to 3.

AlertConfig.N.NoEffectiveIntervalStringNo23:00-06:59

The time period during which the alert rule is ineffective.

Valid values of N: 1 to 3.

AlertConfig.N.ThresholdStringYes5

The alert threshold.

Valid values of N: 1 to 3.

AlertConfig.N.StatisticsStringYesAverage

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.IdStringNo1

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.ArnStringNoacs: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 that triggers the alert. Valid values:
    • queues
    • topics
  • {Resource name}: the resource name.
    • If the resource type is queues, the resource name is the queue name.
    • If the resource type is topics, the resource name is the topic name.
AlertConfig.N.TargetList.N.LevelStringNo["INFO", "WARN", "CRITICAL"]

The alert level. Valid values:

  • INFO
  • WARN
  • CRITICAL
AlertConfig.N.TargetList.N.JsonParamsStringNo{"customField1":"value1","customField2":"$.name"}

The parameters of the alert callback. The parameters are in the JSON format.

Response parameters

ParameterTypeExampleDescription
CodeString200

The status code.

Note The status code 200 indicates that the request was successful.
MessageStringThe Request is not authorization.

The error message.

RequestIdString718FEA81-64C3-4F23-8F90-0531F7489FC1

The request ID.

SuccessBooleantrue

Indicates whether the request was successful. Valid values:

  • true
  • false
ResourceObject

The group process information.

GroupProcessIdString7F2B0024-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 codeError codeError messageDescription
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.

For a list of error codes, see Service error codes.