You can call this operation to create a process to monitor a specified resource group.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

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 123456

The ID of the resource group that you want to monitor.

AlertConfig.N.ComparisonOperator String No GreaterThanOrEqualToThreshold

The comparison operator of the threshold for critical alerts. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to
  • GreaterThanThreshold: greater than
  • LessThanOrEqualToThreshold: less than or equal to
  • LessThanThreshold: less than
  • NotEqualToThreshold: not equal to
  • 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 last monitoring cycle
  • LessThanLastPeriod: less than the metric value in last monitoring cycle
AlertConfig.N.EffectiveInterval String No 00:00-23:59

The time period during which the specified alert rule is effective.

AlertConfig.N.EscalationsLevel String No warn

The severity-level of the alert generated by the resource group monitoring process that you want to create. Valid values:

  • critical: failure
  • warn: warning
  • info: information
AlertConfig.N.NoEffectiveInterval String No 00:00-23:59

The time period during which the specified alert rule is ineffective.

AlertConfig.N.SilenceTime String No 86400

The time period during which the specified alert is muted. Unit: seconds. Minimum value: 3600, which is equivalent to one hour. Default value: 86400, which is equivalent to one day.

Note Only one alert is sent during each mute period even if the metric value consecutively exceeds the alert rule threshold several times.
AlertConfig.N.Statistics String No Average

The method used to calculate alerts.

Note Only the Average method is supported.
AlertConfig.N.Threshold String No 5

The threshold which is used to trigger alerts.

AlertConfig.N.Times String No 3

The number of times for which an alert rule threshold can be consecutively exceeded.

Note A monitoring metric triggers an alert only after the metric value reaches the threshold consecutively for the specified times.
MatchExpress.N.Function String No startWith

The criteria used to match the process with instances. Valid values:

  • all: all
  • startWith: prefix
  • endWith: suffix
  • contains: including
  • notContains: excluding
  • equals: equal to

Default value: all.

MatchExpress.N.Name String No name

The type of the criteria.

Note Only the name parameter is supported. This parameter indicates the name of an instance.
MatchExpress.N.Value String No portalHost

The name of the instance that matches the process.

MatchExpressFilterRelation String No and

The logical operator used to match the process with instances. Valid values:

  • all: all
  • and: and
  • or: or
ProcessName String No http

The name of the process that you want to create.

Response parameters

Parameter Type Example Description
RequestId String 3F6150F9-45C7-43F9-9578-A58B2E726C90

The ID of the request.

Success Boolean true

Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.

Code String 200

The HTTP status code.

Note A value of 200 indicates that the call is successful.
Message String success

The error message.

Note If the status code 200 is returned, no error occurs.

Examples

Sample requests


http(s)://[Endpoint]/? Action=CreateGroupMonitoringAgentProcess
&GroupId=123456
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

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