调用CreateGroupMonitoringAgentProcess接口创建组进程监控。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateGroupMonitoringAgentProcess | 要执行的操作,取值:CreateGroupMonitoringAgentProcess。 |
GroupId | String | 是 | 123456 | 应用分组ID。 |
ProcessName | String | 是 | test1 | 进程名称。 |
MatchExpressFilterRelation | String | 否 | and | 匹配实例的条件。取值:
|
MatchExpress.N.Value | String | 否 | portalHost | 匹配实例名称。 N的取值范围:1~3。 |
MatchExpress.N.Name | String | 否 | name1 | 匹配条件的类型。 N的取值范围:1~3。
说明 目前仅支持Name,即实例名称。
|
MatchExpress.N.Function | String | 否 | startWith | 匹配条件。取值:
N的取值范围:1~3。 |
AlertConfig.N.SilenceTime | String | 否 | 86400 | 通道沉默周期。单位:秒。最小值:3600秒(1小时),默认值:86400秒(1天)。 N的取值范围:1~3。
说明 当监控数据持续超过报警规则阈值时,每个沉默周期内只发送一次报警通知。
|
AlertConfig.N.ComparisonOperator | String | 是 | GreaterThanOrEqualToThreshold | 阈值比较符。取值:
N的取值范围:1~3。 |
AlertConfig.N.Webhook | String | 否 | http://www.aliyun.com | 报警回调URL地址。 N的取值范围:1~3。 |
AlertConfig.N.Times | String | 是 | 3 | 报警级别连续出现次数。默认:3次。 N的取值范围:1~3。
说明 只有当报警级别连续出现设定的次数且达到报警阈值才会触发报警。
|
AlertConfig.N.EscalationsLevel | String | 是 | warn | 报警级别。取值:
N的取值范围:1~3。 |
AlertConfig.N.EffectiveInterval | String | 否 | 00:00-23:59 | 报警规则的生效时间段。 N的取值范围:1~3。 |
AlertConfig.N.NoEffectiveInterval | String | 否 | 00:00-23:59 | 报警规则不生效时间段。 N的取值范围:1~3。 |
AlertConfig.N.Threshold | String | 是 | 5 | 报警阈值。 N的取值范围:1~3。 单位:个。 |
AlertConfig.N.Statistics | String | 是 | Average | 报警统计方式。 N的取值范围:1~3。
说明 目前仅支持Average。
|
AlertConfig.N.TargetList.N.Id | String | 否 | 1 | 报警触发目标ID。 关于如何获取报警触发目标ID,请参见DescribeMetricRuleTargets。 |
AlertConfig.N.TargetList.N.Arn | String | 否 | acs:mns:cn-hangzhou:120886317861****:/queues/test/message | 资源ARN。 关于如何获取资源ARN,请参见DescribeMetricRuleTargets。 资源ARN的格式为
|
AlertConfig.N.TargetList.N.Level | String | 否 | ["INFO", "WARN", "CRITICAL"] | 报警级别。取值:
|
AlertConfig.N.TargetList.N.JsonParams | String | 否 | {"customField1":"value1","customField2":"$.name"} | 报警回调的JSON格式参数。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Code | String | 200 | 状态码。
说明 200表示成功。
|
Message | String | The Request is not authorization. | 错误信息。 |
RequestId | String | 3F6150F9-45C7-43F9-9578-A58B2E726C90 | 请求ID。 |
Success | Boolean | true | 操作是否成功。取值:
|
示例
请求示例
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=123456
&ProcessName=test1
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateGroupMonitoringAgentProcessResponse>
<RequestId>718FEA81-64C3-4F23-8F90-0531F7489FC1</RequestId>
<Code>200</Code>
<Success>true</Success>
</CreateGroupMonitoringAgentProcessResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "718FEA81-64C3-4F23-8F90-0531F7489FC1",
"Code" : 200,
"Success" : true
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
404 | ResourceNotFound | The specified resource is not found. | 未找到指定资源。 |
访问错误中心查看更多错误码。