调用DescribeGroupMonitoringAgentProcess接口获取组进程监控任务列表。

组进程监控用于为组内的所有ECS实例或满足条件的ECS实例同时添加一个进程监控并设置报警规则。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeGroupMonitoringAgentProcess

要执行的操作,取值:DescribeGroupMonitoringAgentProcess。

GroupId String 12345

应用分组ID。

ProcessName String sshd

进程名称。

PageNumber Integer 1

分页页码。默认值:1。

PageSize Integer 10

分页大小。默认值:10。

返回数据

名称 类型 示例值 描述
RequestId String 7985D471-3FA8-4EE9-8F4B-45C19DF3D36F

请求ID。

Code String 200

状态码。

说明 200表示成功。
Success Boolean true

操作是否成功。true表示成功,false表示失败。

Processes Array

进程任务列表。

Process
AlertConfig Array

报警规则配置信息。

AlertConfig
ComparisonOperator String GreaterThanOrEqualToThreshold

Critical级别阈值比较符。取值:

  • GreaterThanOrEqualToThreshold:大于等于。
  • GreaterThanThreshold:大于。
  • LessThanOrEqualToThreshold:小于等于。
  • LessThanThreshold:小于。
  • NotEqualToThreshold:不等。
  • GreaterThanYesterday:同比昨天时间上涨。
  • LessThanYesterday:同比昨天时间下降。
  • GreaterThanLastWeek:同比上周同一时间上涨。
  • LessThanLastWeek:同比上周同一时间下降。
  • GreaterThanLastPeriod:环比上周期上涨。
  • LessThanLastPeriod:环比上周期下降。
EffectiveInterval String 00:00-23:59

报警规则的生效时间段。

EscalationsLevel String warn

报警的级别。取值:

  • critical:故障。
  • warn:警告。
  • info:信息。
NoEffectiveInterval String 00:00-23:59

报警规则不生效时间段。

SilenceTime String 86400

通道沉默周期。单位:秒。最短:3600秒(1小时),默认值:86400秒(1天)。

说明 当监控数据持续超过报警规则阈值时,每个沉默周期内只发送一次报警通知。
Statistics String Average

报警统计方法。

Threshold String 5

报警阈值。

Times String 3

级别连续出现次数。

说明 只有当级别连续出现设定的次数且超过阈值时,才会触发报警。
Webhook String http://www.aliyun.com

报警发生时回调指定的URL地址,向URL发送POST请求。

GroupId String 12345

应用分组的ID。

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

进程任务的ID。

MatchExpress Array

匹配条件。

说明 只有符合匹配条件的应用分组,实例才能被添加到对应的进程中。
MatchExpress
Function String all

匹配条件。取值:

  • all(默认值):全部。
  • startWith:前缀。
  • endWith:后缀。
  • contains:包含。
  • notContains:不包含。
  • equals:相等。
说明 对于满足条件的规则,实例会添加对应的进程监控。
Name String name

匹配条件的类型。

说明 目前仅支持name,即实例名称。
Value String portalHost

匹配实例名称。

MatchExpressFilterRelation String and

匹配实例的条件。取值:

  • all:全部。
  • and:与。
  • or:或。
ProcessName String sshd

进程名称。

Message String The Request is not authorization.

错误信息。

PageNumber String 1

分页码。默认值:1。

PageSize String 10

每页显示记录条数。默认值:10。

Total String 28

总记录条数。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeGroupMonitoringAgentProcess
&GroupId=12345
&<公共请求参数>

正常返回示例

XML 格式

<DescribeGroupMonitoringAgentProcess>
		  <RequestId>7985D471-3FA8-4EE9-8F4B-45C19DF3D36F</RequestId>
		  <PageSize>10</PageSize>
		  <PageNumber>1</PageNumber>
		  <Total>28</Total>
		  <Processes>
			    <Process>
				      <ProcessName>sshd</ProcessName>
				      <MatchExpressFilterRelation>and</MatchExpressFilterRelation>
				      <Id>3F6150F9-45C7-43F9-9578-A58B2E72****</Id>
				      <GroupId>12345</GroupId>
			    </Process>
			    <Process>
				      <AlertConfig>
					        <AlertConfig>
						          <Function>all</Function>
						          <Value>portalHost</Value>
						          <Name>name</Name>
					        </AlertConfig>
					        <AlertConfig>
						          <NoEffectiveInterval>00:00-23:59</NoEffectiveInterval>
						          <SilenceTime>86400</SilenceTime>
						          <ComparisonOperator>GreaterThanOrEqualToThreshold</ComparisonOperator>
						          <Times>3</Times>
						          <Webhook>http://www.aliyun.com</Webhook>
						          <EffectiveInterval>00:00-23:59</EffectiveInterval>
						          <EscalationsLevel>warn</EscalationsLevel>
						          <Statistics>Average</Statistics>
						          <Threshold>5</Threshold>
					        </AlertConfig>
				      </AlertConfig>
				      <MatchExpress>
					        <MatchExpress>
						          <Function>all</Function>
						          <Value>portalHost</Value>
						          <Name>name</Name>
					        </MatchExpress>
					        <MatchExpress>
						          <NoEffectiveInterval>00:00-23:59</NoEffectiveInterval>
						          <SilenceTime>86400</SilenceTime>
						          <ComparisonOperator>GreaterThanOrEqualToThreshold</ComparisonOperator>
						          <Times>3</Times>
						          <Webhook>http://www.aliyun.com</Webhook>
						          <EffectiveInterval>00:00-23:59</EffectiveInterval>
						          <EscalationsLevel>warn</EscalationsLevel>
						          <Statistics>Average</Statistics>
						          <Threshold>5</Threshold>
					        </MatchExpress>
				      </MatchExpress>
			    </Process>
		  </Processes>
		  <Code>200</Code>
		  <Success>true</Success>
</DescribeGroupMonitoringAgentProcess>

JSON 格式

{
    "RequestId":"7985D471-3FA8-4EE9-8F4B-45C19DF3D36F",
    "PageSize":"10",
    "PageNumber":"1",
    "Total":"28",
    "Processes":{
        "Process":[
            {
                "ProcessName":"sshd",
                "MatchExpressFilterRelation":"and",
                "Id":"3F6150F9-45C7-43F9-9578-A58B2E72****",
                "GroupId":"12345"
            },
            {
                "AlertConfig":{
                    "AlertConfig":[
                        {
                            "Function":"all",
                            "Value":"portalHost",
                            "Name":"name"
                        },
                        {
                            "NoEffectiveInterval":"00:00-23:59",
                            "SilenceTime":"86400",
                            "ComparisonOperator":"GreaterThanOrEqualToThreshold",
                            "Times":"3",
                            "Webhook":"http://www.aliyun.com",
                            "EffectiveInterval":"00:00-23:59",
                            "EscalationsLevel":"warn",
                            "Statistics":"Average",
                            "Threshold":"5"
                        }]
                },
                "MatchExpress":{
                    "MatchExpress":[
                        {
                            "Function":"all",
                            "Value":"portalHost",
                            "Name":"name"
                        },
                        {
                            "NoEffectiveInterval":"00:00-23:59",
                            "SilenceTime":"86400",
                            "ComparisonOperator":"GreaterThanOrEqualToThreshold",
                            "Times":"3",
                            "Webhook":"http://www.aliyun.com",
                            "EffectiveInterval":"00:00-23:59",
                            "EscalationsLevel":"warn",
                            "Statistics":"Average",
                            "Threshold":"5"
                        }]
                }
            }]
    },
    "Code":"200",
    "Success":"true"
}

错误码

访问错误中心查看更多错误码。