All Products
Search
Document Center

CloudMonitor:CreateGroupMonitoringAgentProcess

Last Updated:Mar 01, 2024

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.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
GroupIdstringYes

The ID of the application group.

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

123456
ProcessNamestringYes

The process name.

test1
MatchExpressFilterRelationstringNo

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

  • all
  • and
  • or
and
MatchExpressobject []No

The expressions used to match instances.

Valid values of N: 1 to 3.

ValuestringNo

The keyword used to match the instance name.

Valid values of N: 1 to 3.

portalHost
NamestringNo

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
FunctionstringNo

The matching condition. Valid values:

  • all (default value): 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.

startWith
AlertConfigobject []Yes

The alert rule configurations.

Valid values of N: 1 to 3.

SilenceTimestringNo

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
ComparisonOperatorstringYes

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.

GreaterThanOrEqualToThreshold
WebhookstringNo

The callback URL.

Valid values of N: 1 to 3.

http://www.aliyun.com
TimesstringYes

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
EscalationsLevelstringYes

The alert level. Valid values:

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

Valid values of N: 1 to 3.

warn
EffectiveIntervalstringNo

The time period during which the alert rule is effective.

Valid values of N: 1 to 3.

00:00-23:59
NoEffectiveIntervalstringNo

This parameter is deprecated.

00:00-23:59
ThresholdstringYes

The alert threshold.

Valid values of N: 1 to 3.

Unit: cores.

5
StatisticsstringYes

The statistical method for alerts.

Valid values of N: 1 to 3.

Note Set the value to Average.
Average
TargetListobject []No

The alert triggers.

IdstringNo

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
ArnstringNo

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.
acs:mns:cn-hangzhou:120886317861****:/queues/test/message
LevelstringNo

The alert level. Valid values:

  • INFO
  • WARN
  • CRITICAL
["INFO", "WARN", "CRITICAL"]
JsonParamsstringNo

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

{"customField1":"value1","customField2":"$.name"}

Response parameters

ParameterTypeDescriptionExample
object

None.

Codestring

The status code.

Note The status code 200 indicates that the call is successful.
200
Messagestring

The error message.

The Request is not authorization.
RequestIdstring

The request ID.

3F6150F9-45C7-43F9-9578-A58B2E726C90
Successboolean

Indicates whether the call is successful. Valid values:

  • true: The call is successful.
  • false: The call fails.
true
Resourceobject

The group process information.

GroupProcessIdstring

The ID of the group process.

7F2B0024-4F21-48B9-A764-211CEC48****

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400ParameterInvalid%s-
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
500InternalErrorThe request processing has failed due to some unknown error.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-20The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.
2022-08-05The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500