Queries the details of initiative alert rules.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeActiveMetricRuleList

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

ProductStringYesecs

The abbreviation of the cloud service that supports initiative alert rules.

For more information about how to obtain the name of a cloud service, see DescribeProductsOfActiveMetricRule.

Response parameters

ParameterTypeExampleDescription
CodeString200

The HTTP status code.

Note The status code 200 indicates that the request was successful.
MessageStringThe Request is not authorization.

The error message.

RequestIdStringF82E6667-7811-4BA0-842F-5B2DC42BBAAD

The request ID.

SuccessBooleantrue

Indicates whether the request was successful. Valid values:

  • true
  • false
DatapointsArray of Alarm

The details of the alert rules.

Alarm
SilenceTimeString86400

The mute period during which new alerts are not sent even if the trigger conditions are met.

Unit: seconds.

MetricNameStringcpu_total

The name of the metric.

EvaluationCountString3

The consecutive number of times for which the metric value meets the trigger condition before an alert is triggered.

WebhookStringhttps://www.aliyun.com

The callback URL.

StateStringEnable

Indicates whether the alert rule is enabled.

ContactGroupsStringECS_Group

The alert contact group.

NamespaceStringacs_ecs_dashboard

The namespace of the cloud service.

RuleNameStringSystemDefault_acs_rds_dashboard_CpuUsage

The name of the alert rule.

RuleIdStringa151cd6023eacee2f0978e03863cc1697c89508****

The ID of the alert rule.

PeriodString60

The aggregation period of monitoring data.

Unit: seconds.

ComparisonOperatorString>

The comparison operator that is used in the alert rule. Valid values:

  • >
  • <
  • >=
  • <=
  • =
  • =
EndTimeString24

The end of the time period during which the alert rule is effective.

Unit: hours. For example, the value 23 indicates 23:59:59.

StartTimeString00

The beginning of the time period during which the alert rule is effective.

Unit: hours. For example, the value 00 indicates 00:00:00.

ThresholdString90

The alert threshold.

StatisticsStringAverage

The statistical method.

EnableStringtrue

Indicates whether the alert rule is enabled. Valid values:

  • true: The alert rule is enabled.
  • false: The alert rule is disabled.
AlertListArray of Alert

The details of the alert rules. The result is in the same structure as that returned by the DescribeMetricRuleList operation.

Alert
SilenceTimeString86400

The mute period during which new alerts are not sent even if the trigger conditions are met.

Unit: seconds.

MetricNameStringcpu_total

The name of the metric.

WebhookStringhttp://www.aliyun.com

The callback URL.

ContactGroupsStringECS_Group

The alert contact group.

NamespaceStringacs_ecs_dashboard

The namespace of the cloud service.

EffectiveIntervalString00:00-23:59

The time period during which the alert rule is effective.

NoEffectiveIntervalString00:00-06:00

The time period during which the alert rule is ineffective.

MailSubjectStringECS_Bucket

The subject of the alert notification email.

RuleNameStringmyAlert

The name of the alert rule.

RuleIdStringruleIdxxxx

The ID of the alert rule.

PeriodString60

The aggregation period of monitoring data.

Unit: seconds.

AlertStateStringOK

The status of the alert rule. Valid values:

  • OK: The alert rule has no active alerts.
  • ALARM: The alert rule has active alerts.
  • INSUFFICIENT_DATA: No data is available.
DimensionsString""

The monitoring data of the specified resource.

EnableStateBooleantrue

Indicates whether the alert rule is enabled. Valid values:

  • true: The alert rule is enabled.
  • false: The alert rule is disabled.
ResourcesString[{"resource":"_ALL"}]

The resources that are associated with the alert rule.

EscalationsObject

The conditions for triggering different levels of alerts.

InfoObject

The conditions for triggering Info-level alerts.

ComparisonOperatorStringGreaterThanThreshold

The comparison operator that is used to compare the metric value with the threshold for Info-level alerts. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold
  • GreaterThanThreshold: greater than the threshold
  • LessThanOrEqualToThreshold: less than or equal to the threshold
  • LessThanThreshold: less than the threshold
  • NotEqualToThreshold: not equal to the threshold
  • 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 the last monitoring cycle
  • LessThanLastPeriod: less than the metric value in the last monitoring cycle
TimesString3

The consecutive number of times for which the metric value exceeds the threshold for Info-level alerts before an alert is triggered.

ThresholdString95

The threshold for Info-level alerts.

StatisticsStringAverage

The statistical methods for Info-level alerts.

WarnObject

The condition for triggering Warn-level alerts.

ComparisonOperatorStringGreaterThanThreshold

The comparison operator that is used to compare the metric value with the threshold for Critical-level alerts. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold
  • GreaterThanThreshold: greater than the threshold
  • LessThanOrEqualToThreshold: less than or equal to the threshold
  • LessThanThreshold: less than the threshold
  • NotEqualToThreshold: not equal to the threshold
  • 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 the last monitoring cycle
  • LessThanLastPeriod: less than the metric value in the last monitoring cycle
TimesString3

The consecutive number of times for which the metric value exceeds the threshold for Warn-level alerts before an alert is triggered.

ThresholdString80

The threshold for Warn-level alerts.

StatisticsStringAverage

The statistical methods for Warn-level alerts.

CriticalObject

The conditions for triggering Critical-level alerts.

ComparisonOperatorStringGreaterThanThreshold

The comparison operator that is used to compare the metric value with the threshold for Critical-level alerts. Valid values:

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold
  • GreaterThanThreshold: greater than the threshold
  • LessThanOrEqualToThreshold: less than or equal to the threshold
  • LessThanThreshold: less than the threshold
  • NotEqualToThreshold: not equal to the threshold
  • 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 the last monitoring cycle
  • LessThanLastPeriod: less than the metric value in the last monitoring cycle
TimesString3

The consecutive number of times for which the metric value exceeds the threshold for Critical-level alerts before an alert is triggered.

ThresholdString99

The threshold for Critical-level alerts.

StatisticsStringAverage

The statistical methods for Critical-level alerts.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeActiveMetricRuleList
&Product=ecs
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeActiveMetricRuleListResponse>
        <AlertList>
            <Alert>
                <SilenceTime>86400</SilenceTime>
                <ContactGroups>ECS_Group</ContactGroups>
                <NoEffectiveInterval></NoEffectiveInterval>
                <MailSubject>${serviceType}-${metricName}-${levelDescription}</MailSubject>
                <RuleId>SystemDefault_acs_rds_dashboard_IOPSUsage</RuleId>
                <Period>300</Period>
                <Dimensions></Dimensions>
                <EffectiveInterval></EffectiveInterval>
                <Namespace>acs_rds_dashboard</Namespace>
                <AlertState>INSUFFICIENT_DATA</AlertState>
                <MetricName>IOPSUsage</MetricName>
                <EnableState>true</EnableState>
                <Escalations>
                    <Critical />
                    <Info>
                        <ComparisonOperator>GreaterThanThreshold</ComparisonOperator>
                        <Times>5</Times>
                        <Statistics>Average</Statistics>
                        <Threshold>80</Threshold>
                    </Info>
                    <Warn />
                </Escalations>
                <Webhook></Webhook>
                <Resources>[{\"resource\":\"_ALL\"}]</Resources>
                <RuleName>SystemDefault_acs_rds_dashboard_IOPSUsage</RuleName>
            </Alert>
            <Alert>
                <SilenceTime>86400</SilenceTime>
                <ContactGroups>ECS_Group</ContactGroups>
                <NoEffectiveInterval></NoEffectiveInterval>
                <MailSubject>${serviceType}-${metricName}-${levelDescription}</MailSubject>
                <RuleId>SystemDefault_acs_rds_dashboard_CpuUsage</RuleId>
                <Period>300</Period>
                <Dimensions></Dimensions>
                <EffectiveInterval></EffectiveInterval>
                <Namespace>acs_rds_dashboard</Namespace>
                <AlertState>INSUFFICIENT_DATA</AlertState>
                <MetricName>CpuUsage</MetricName>
                <EnableState>true</EnableState>
                <Escalations>
                    <Critical />
                    <Info>
                        <ComparisonOperator>GreaterThanThreshold</ComparisonOperator>
                        <Times>5</Times>
                        <Statistics>Average</Statistics>
                        <Threshold>80</Threshold>
                    </Info>
                    <Warn />
                </Escalations>
                <Webhook></Webhook>
                <Resources>[{\"resource\":\"_ALL\"}]</Resources>
                <RuleName>SystemDefault_acs_rds_dashboard_CpuUsage</RuleName>
            </Alert>
        </AlertList>
        <Datapoints>
            <Alarm>
                <SilenceTime>86400</SilenceTime>
                <ContactGroups>[\"Alice\"]</ContactGroups>
                <ComparisonOperator>GreaterThanThreshold</ComparisonOperator>
                <EndTime></EndTime>
                <RuleId>SystemDefault_acs_rds_dashboard_IOPSUsage</RuleId>
                <StartTime></StartTime>
                <Period>300</Period>
                <EvaluationCount>5</EvaluationCount>
                <Statistics>Average</Statistics>
                <Namespace>acs_rds_dashboard</Namespace>
                <MetricName>IOPSUsage</MetricName>
                <State>INSUFFICIENT_DATA</State>
                <Enable>true</Enable>
                <Webhook></Webhook>
                <RuleName>SystemDefault_acs_rds_dashboard_IOPSUsage</RuleName>
                <Threshold>80</Threshold>
            </Alarm>
            <Alarm>
                <SilenceTime>86400</SilenceTime>
                <ContactGroups>[\"Jim\"]</ContactGroups>
                <ComparisonOperator>GreaterThanThreshold</ComparisonOperator>
                <EndTime></EndTime>
                <RuleId>SystemDefault_acs_rds_dashboard_CpuUsage</RuleId>
                <StartTime></StartTime>
                <Period>300</Period>
                <EvaluationCount>5</EvaluationCount>
                <Statistics>Average</Statistics>
                <Namespace>acs_rds_dashboard</Namespace>
                <MetricName>CpuUsage</MetricName>
                <State>INSUFFICIENT_DATA</State>
                <Enable>true</Enable>
                <Webhook></Webhook>
                <RuleName>SystemDefault_acs_rds_dashboard_CpuUsage</RuleName>
                <Threshold>80</Threshold>
            </Alarm>
        </Datapoints>
        <Code>200</Code>
        <Success>true</Success>
</DescribeActiveMetricRuleListResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "AlertList" : {
    "Alert" : [ {
      "SilenceTime" : 86400,
      "ContactGroups" : "ECS_Group",
      "NoEffectiveInterval" : "",
      "MailSubject" : "${serviceType}-${metricName}-${levelDescription}",
      "RuleId" : "SystemDefault_acs_rds_dashboard_IOPSUsage",
      "Period" : 300,
      "Dimensions" : "",
      "EffectiveInterval" : "",
      "Namespace" : "acs_rds_dashboard",
      "AlertState" : "INSUFFICIENT_DATA",
      "MetricName" : "IOPSUsage",
      "EnableState" : true,
      "Escalations" : {
        "Critical" : { },
        "Info" : {
          "ComparisonOperator" : "GreaterThanThreshold",
          "Times" : 5,
          "Statistics" : "Average",
          "Threshold" : "80"
        },
        "Warn" : { }
      },
      "Webhook" : "",
      "Resources" : "[{\"resource\":\"_ALL\"}]",
      "RuleName" : "SystemDefault_acs_rds_dashboard_IOPSUsage"
    }, {
      "SilenceTime" : 86400,
      "ContactGroups" : "ECS_Group",
      "NoEffectiveInterval" : "",
      "MailSubject" : "${serviceType}-${metricName}-${levelDescription}",
      "RuleId" : "SystemDefault_acs_rds_dashboard_CpuUsage",
      "Period" : 300,
      "Dimensions" : "",
      "EffectiveInterval" : "",
      "Namespace" : "acs_rds_dashboard",
      "AlertState" : "INSUFFICIENT_DATA",
      "MetricName" : "CpuUsage",
      "EnableState" : true,
      "Escalations" : {
        "Critical" : { },
        "Info" : {
          "ComparisonOperator" : "GreaterThanThreshold",
          "Times" : 5,
          "Statistics" : "Average",
          "Threshold" : "80"
        },
        "Warn" : { }
      },
      "Webhook" : "",
      "Resources" : "[{\"resource\":\"_ALL\"}]",
      "RuleName" : "SystemDefault_acs_rds_dashboard_CpuUsage"
    } ]
  },
  "Datapoints" : {
    "Alarm" : [ {
      "SilenceTime" : 86400,
      "ContactGroups" : "[\"Alice\"]",
      "ComparisonOperator" : "GreaterThanThreshold",
      "EndTime" : "",
      "RuleId" : "SystemDefault_acs_rds_dashboard_IOPSUsage",
      "StartTime" : "",
      "Period" : 300,
      "EvaluationCount" : 5,
      "Statistics" : "Average",
      "Namespace" : "acs_rds_dashboard",
      "MetricName" : "IOPSUsage",
      "State" : "INSUFFICIENT_DATA",
      "Enable" : true,
      "Webhook" : "",
      "RuleName" : "SystemDefault_acs_rds_dashboard_IOPSUsage",
      "Threshold" : "80"
    }, {
      "SilenceTime" : 86400,
      "ContactGroups" : "[\"Jim\"]",
      "ComparisonOperator" : "GreaterThanThreshold",
      "EndTime" : "",
      "RuleId" : "SystemDefault_acs_rds_dashboard_CpuUsage",
      "StartTime" : "",
      "Period" : 300,
      "EvaluationCount" : 5,
      "Statistics" : "Average",
      "Namespace" : "acs_rds_dashboard",
      "MetricName" : "CpuUsage",
      "State" : "INSUFFICIENT_DATA",
      "Enable" : true,
      "Webhook" : "",
      "RuleName" : "SystemDefault_acs_rds_dashboard_CpuUsage",
      "Threshold" : "80"
    } ]
  },
  "Code" : "200",
  "Success" : true
}

Error codes

HTTP status codeError codeError messageDescription
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.

For a list of error codes, see Service error codes.