显示一键报警规则的列表详情。

调试

前往【API Explorer】在线调试,API Explorer 提供在线调用 API、动态生成 SDK Example 代码和快速检索接口等能力,能显著降低使用云 API 的难度,强烈推荐使用。

请求参数

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

系统规定参数。取值:DescribeActiveMetricRuleList。

Product String ecs

产品缩写, 如ecs。目前支持一键告警的产品:

  • ecs (云服务器 ECS)
  • rds (云数据库RDS版)
  • slb (负载均衡)
  • redis_standard (云数据库Redis标准版)
  • redis_sharding (云数据库Redis集群版)
  • redis_splitrw (云数据库Redis读写分离版)
  • mongodb (云数据库MongoDB版(副本集))
  • mongodb_sharding (云数据库MongoDB版(分片集群))
  • hbase (云数据库HBase版)
  • elasticsearch (Elasticsearch)
  • opensearch (OpenSearch)

返回参数

名称 类型 示例值 描述
Code String 200

状态码,200表示成功。

Datapoints

报警规则列表。

  └ComparisonOperator String >

报警规则比较符号。

  └ContactGroups String 云账号报警联系人

报警联系人组。

  └Enable String true

报警规则启用状态:

  • true:启用
  • false:禁用
  └EndTime String 24

报警规则生效结束时间, 单位是小时 23表示 23:59:59。

  └EvaluationCount String 3

重试次数。

  └MetricName String cpu_total

监控项的名称。

  └Namespace String acs_ecs_dashboard

产品的数据命名空间,可查询DescribeMetricMetaList接口或参考预设监控项参考

  └Period String 60

监控数据的聚合周期,单位秒。默认取值为监控项对应的最小频率,通常不需要指定。

  └RuleId String a151cd6023eacee2f0978e03863cc1697c89508****

报警规则ID。

  └RuleName String SystemDefault_acs_rds_dashboard_CpuUsage

报警规则名称。

  └SilenceTime String 86400

通道沉默时间,单位是秒, 默认86400。

  └StartTime String 00

报警规则生效起始时间, 00表示 00:00:00。

  └State String Enable

报警规则的启用状态。

  └Statistics String Average

统计方法。

  └Threshold String 90

报警阈值。

  └Webhook String http://www.aliyun.com

URL回调地址。

Message String success

错误信息。

RequestId String F82E6667-7811-4BA0-842F-5B2DC42BBAAD

请求ID,用于排查问题。

Success Boolean true

是否成功。

示例

请求示例


http(s)://[Endpoint]/?Action=DescribeActiveMetricRuleList
&Product=ecs
&<公共请求参数>

正常返回示例

XML 格式

<DescribeActiveMetricRuleListResponse>
  <Code>200</Code>
  <Success>true</Success>
  <Datapoints>
    <Alarm>
      <Namespace>acs_rds_dashboard</Namespace>
      <Statistics>Average</Statistics>
      <Uuid>ef983030-c143-4b1b-b6c7-d4227c99****</Uuid>
      <ContactGroups>["云账号报警联系人"]</ContactGroups>
      <Webhook>null</Webhook>
      <EvaluationCount>5</EvaluationCount>
      <Period>300</Period>
      <NotifyType>0</NotifyType>
      <State>OK</State>
      <Enable>true</Enable>
      <StartTime>0</StartTime>
      <EndTime>24</EndTime>
      <RuleName>SystemDefault_acs_rds_dashboard_CpuUsage</RuleName>
      <Threshold>80</Threshold>
      <MetricName>CpuUsage#300</MetricName>
      <ComparisonOperator>&gt;</ComparisonOperator>
      <SilenceTime>86400</SilenceTime>
      <Name>SystemDefault_acs_rds_dashboard_CpuUsage</Name>
    </Alarm>
    <Alarm>
      <Namespace>acs_rds_dashboard</Namespace>
      <Statistics>Average</Statistics>
      <Uuid>30b95d23-627e-4e3f-bd8a-b41099aa****</Uuid>
      <ContactGroups>["云账号报警联系人"]</ContactGroups>
      <Webhook>null</Webhook>
      <EvaluationCount>5</EvaluationCount>
      <Period>300</Period>
      <NotifyType>1</NotifyType>
      <State>OK</State>
      <Enable>true</Enable>
      <StartTime>0</StartTime>
      <EndTime>24</EndTime>
      <RuleName>SystemDefault_acs_rds_dashboard_DiskUsage</RuleName>
      <Threshold>80</Threshold>
      <MetricName>DiskUsage#300</MetricName>
      <ComparisonOperator>&gt;</ComparisonOperator>
      <SilenceTime>86400</SilenceTime>
      <Name>SystemDefault_acs_rds_dashboard_DiskUsage</Name>
    </Alarm>
    <Alarm>
      <Namespace>acs_rds_dashboard</Namespace>
      <Statistics>Average</Statistics>
      <Uuid>2a657281-ae3b-45e7-8ee6-0346bc83****</Uuid>
      <ContactGroups>["云账号报警联系人"]</ContactGroups>
      <Webhook>null</Webhook>
      <EvaluationCount>5</EvaluationCount>
      <Period>300</Period>
      <NotifyType>0</NotifyType>
      <State>OK</State>
      <Enable>true</Enable>
      <StartTime>0</StartTime>
      <EndTime>24</EndTime>
      <RuleName>SystemDefault_acs_rds_dashboard_IOPSUsage</RuleName>
      <Threshold>80</Threshold>
      <MetricName>IOPSUsage#300</MetricName>
      <ComparisonOperator>&gt;</ComparisonOperator>
      <SilenceTime>86400</SilenceTime>
      <Name>SystemDefault_acs_rds_dashboard_IOPSUsage</Name>
    </Alarm>
    <Alarm>
      <Namespace>acs_rds_dashboard</Namespace>
      <Statistics>Average</Statistics>
      <Uuid>c8c0cae5-2999-4fab-8b6e-1b8581cd****</Uuid>
      <ContactGroups>["云账号报警联系人"]</ContactGroups>
      <Webhook>null</Webhook>
      <EvaluationCount>5</EvaluationCount>
      <Period>300</Period>
      <NotifyType>0</NotifyType>
      <State>OK</State>
      <Enable>true</Enable>
      <StartTime>0</StartTime>
      <EndTime>24</EndTime>
      <RuleName>SystemDefault_acs_rds_dashboard_ConnectionUsage</RuleName>
      <Threshold>80</Threshold>
      <MetricName>ConnectionUsage#300</MetricName>
      <ComparisonOperator>&gt;</ComparisonOperator>
      <SilenceTime>86400</SilenceTime>
      <Name>SystemDefault_acs_rds_dashboard_ConnectionUsage</Name>
    </Alarm>
    <Alarm>
      <Namespace>acs_rds_dashboard</Namespace>
      <Statistics>Average</Statistics>
      <Uuid>22798954-b384-4b5a-b9cd-bf39bbf8ee5f</Uuid>
      <ContactGroups>["云账号报警联系人"]</ContactGroups>
      <Webhook>null</Webhook>
      <EvaluationCount>5</EvaluationCount>
      <Period>300</Period>
      <NotifyType>0</NotifyType>
      <State>INSUFFICIENT_DATA</State>
      <Enable>true</Enable>
      <StartTime>0</StartTime>
      <EndTime>24</EndTime>
      <RuleName>SystemDefault_acs_rds_dashboard_DataDelay</RuleName>
      <Threshold>5</Threshold>
      <MetricName>DataDelay#300</MetricName>
      <ComparisonOperator>&gt;</ComparisonOperator>
      <SilenceTime>86400</SilenceTime>
      <Name>SystemDefault_acs_rds_dashboard_DataDelay</Name>
    </Alarm>
  </Datapoints>
</DescribeActiveMetricRuleListResponse>

JSON 格式

{
	"Datapoints":{
		"Alarm":[
			{
				"Uuid":"ef983030-c143-4b1b-b6c7-d4227c99****",
				"Period":300,
				"Statistics":"Average",
				"Webhook":"null",
				"RuleName":"SystemDefault_acs_rds_dashboard_CpuUsage",
				"EvaluationCount":5,
				"Name":"SystemDefault_acs_rds_dashboard_CpuUsage",
				"MetricName":"CpuUsage#300",
				"Threshold":"80",
				"State":"OK",
				"Enable":true,
				"SilenceTime":86400,
				"NotifyType":0,
				"Namespace":"acs_rds_dashboard",
				"ContactGroups":"[\"云账号报警联系人\"]",
				"EndTime":24,
				"StartTime":0,
				"ComparisonOperator":">"
			},
			{
				"Uuid":"30b95d23-627e-4e3f-bd8a-b41099aa****",
				"Period":300,
				"Statistics":"Average",
				"Webhook":"null",
				"RuleName":"SystemDefault_acs_rds_dashboard_DiskUsage",
				"EvaluationCount":5,
				"Name":"SystemDefault_acs_rds_dashboard_DiskUsage",
				"MetricName":"DiskUsage#300",
				"Threshold":"80",
				"State":"OK",
				"Enable":true,
				"SilenceTime":86400,
				"NotifyType":1,
				"Namespace":"acs_rds_dashboard",
				"ContactGroups":"[\"云账号报警联系人\"]",
				"EndTime":24,
				"StartTime":0,
				"ComparisonOperator":">"
			},
			{
				"Uuid":"2a657281-ae3b-45e7-8ee6-0346bc83****",
				"Period":300,
				"Statistics":"Average",
				"Webhook":"null",
				"RuleName":"SystemDefault_acs_rds_dashboard_IOPSUsage",
				"EvaluationCount":5,
				"Name":"SystemDefault_acs_rds_dashboard_IOPSUsage",
				"MetricName":"IOPSUsage#300",
				"Threshold":"80",
				"State":"OK",
				"Enable":true,
				"SilenceTime":86400,
				"NotifyType":0,
				"Namespace":"acs_rds_dashboard",
				"ContactGroups":"[\"云账号报警联系人\"]",
				"EndTime":24,
				"StartTime":0,
				"ComparisonOperator":">"
			},
			{
				"Uuid":"c8c0cae5-2999-4fab-8b6e-1b8581cd****",
				"Period":300,
				"Statistics":"Average",
				"Webhook":"null",
				"RuleName":"SystemDefault_acs_rds_dashboard_ConnectionUsage",
				"EvaluationCount":5,
				"Name":"SystemDefault_acs_rds_dashboard_ConnectionUsage",
				"MetricName":"ConnectionUsage#300",
				"Threshold":"80",
				"State":"OK",
				"Enable":true,
				"SilenceTime":86400,
				"NotifyType":0,
				"Namespace":"acs_rds_dashboard",
				"ContactGroups":"[\"云账号报警联系人\"]",
				"EndTime":24,
				"StartTime":0,
				"ComparisonOperator":">"
			},
			{
				"Uuid":"22798954-b384-4b5a-b9cd-bf39bbf8****",
				"Period":300,
				"Statistics":"Average",
				"Webhook":"null",
				"RuleName":"SystemDefault_acs_rds_dashboard_DataDelay",
				"EvaluationCount":5,
				"Name":"SystemDefault_acs_rds_dashboard_DataDelay",
				"MetricName":"DataDelay#300",
				"Threshold":"5",
				"State":"INSUFFICIENT_DATA",
				"Enable":true,
				"SilenceTime":86400,
				"NotifyType":0,
				"Namespace":"acs_rds_dashboard",
				"ContactGroups":"[\"云账号报警联系人\"]",
				"EndTime":24,
				"StartTime":0,
				"ComparisonOperator":">"
			}
		]
	},
	"Success":true,
	"Code":"200"
}

错误码

查看本产品错误码