You can call this operation to query processes that monitor a resource group.

You can create a process to monitor all or the specified Elastic Compute Service (ECS) instances in a resource group, and set alert rules for the process.

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 DescribeGroupMonitoringAgentProcess

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

GroupId String Yes 12345

The ID of the monitored resource group.

PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page. Default value: 10.

ProcessName String No sshd

The name of the process that monitors the specified resource group.

Response parameters

Parameter Type Example Description
RequestId String 7985D471-3FA8-4EE9-8F4B-45C19DF3D36F

The ID of the request.

Code String 200

The HTTP status code.

Note A value of 200 indicates that the call is successful.
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.

Processes Array

The list of processes that were queried.

Process

The list of processes that were queried.

AlertConfig Array

The configurations of the alert rule.

AlertConfig

The configurations of the alert rule.

ComparisonOperator String 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
EffectiveInterval String 00:00-23:59

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

EscalationsLevel String warn

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

  • critical: failure
  • warn: warning
  • info: information
NoEffectiveInterval String 00:00-23:59

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

SilenceTime String 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.
Statistics String Average

The method used to calculate alerts.

Threshold String 5

The threshold which is used to trigger alerts.

Times String 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.
GroupId String 12345

The ID of the monitored resource group.

Id String 3F6150F9-45C7-43F9-9578-A58B2E72****

The ID of the monitoring process that was queried.

MatchExpress Array

The criteria used to match the process with instances.

Note Only the instances that meet the criteria are monitored by the process.
MatchExpress

The criteria used to match the process with instances.

Note Only the instances that meet the criteria are monitored by the process.
Function String all

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.

Name String name

The type of the criteria.

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

The name of the matched instance.

MatchExpressFilterRelation String and

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

  • all: all
  • and: and
  • or: or
ProcessName String sshd

The name of the process.

Message String success

The error message.

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

Examples

Sample requests


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

Sample success responses

XML format

<RequestId>7985D471-3FA8-4EE9-8F4B-45C19DF3D36F</RequestId>
<Processes>
    <Process>
        <Id>3F6150F9-45C7-43F9-9578-A58B2E726C90</Id>
        <AlertConfig>
            <AlertConfig>
                <Statistics>Average</Statistics>
                <Threshold>5</Threshold>
                <SilenceTime>86400</SilenceTime>
                <EffectiveInterval>00:00-23:59</EffectiveInterval>
                <Times>3</Times>
                <EscalationsLevel>warn</EscalationsLevel>
                <NoEffectiveInterval>00:00-23:59</NoEffectiveInterval>
                <ComparisonOperator>GreaterThanOrEqualToThreshold</ComparisonOperator>
            </AlertConfig>
        </AlertConfig>
        <ProcessName>sshd</ProcessName>
        <MatchExpressFilterRelation>and</MatchExpressFilterRelation>
        <GroupId>12345</GroupId>
        <MatchExpress>
            <MatchExpress>
                <Name>name</Name>
                <Value>portalHost</Value>
                <Function>all</Function>
            </MatchExpress>
        </MatchExpress>
    </Process>
</Processes>
<Success>true</Success>
<Code>200</Code>

JSON format

{
	"RequestId":"7985D471-3FA8-4EE9-8F4B-45C19DF3D36F",
	"Processes":{
		"Process":[
			{
				"Id":"3F6150F9-45C7-43F9-9578-A58B2E726C90",
				"ProcessName":"sshd",
				"AlertConfig":{
					"AlertConfig":[
						{
							"Statistics":"Average",
							"Threshold":"5",
							"EffectiveInterval":"00:00-23:59",
							"SilenceTime":86400,
							"Times":3,
							"EscalationsLevel": "warn ",
							"ComparisonOperator":"GreaterThanOrEqualToThreshold"
							"NoEffectiveInterval":"00:00-23:59"
						}
					]
				},
				"MatchExpressFilterRelation":"and",
				"GroupId":12345,
				"MatchExpress":{
					"MatchExpress":[
						{
							"Name":"name",
							"Value":"portalHost",
							"Function":"all"
						}
					]
				}
			}
		]
	},
	"Success":true,
	"Code":200
}

Error codes

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