All Products
Search
Document Center

CloudMonitor:DescribeActiveMetricRuleList

Last Updated:Jul 26, 2024

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cms:DescribeActiveMetricRuleListget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProductstringYes

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 .

ecs

Response parameters

ParameterTypeDescriptionExample
object

None.

Codestring

The HTTP status code.

Note The status code 200 indicates that the request was successful.
200
Messagestring

The returned message.

The Request is not authorization.
RequestIdstring

The request ID.

F82E6667-7811-4BA0-842F-5B2DC42BBAAD
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Datapointsarray<object>

The details of the alert rules.

object
SilenceTimestring

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

Unit: seconds.

86400
MetricNamestring

The metric name.

cpu_total
EvaluationCountstring

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

3
Webhookstring

The callback URL.

http://www.aliyun.com
Statestring

Indicates whether the alert rule is enabled.

Enable
ContactGroupsstring

The alert contact group.

ECS_Group
Namespacestring

The namespace of the cloud service.

acs_ecs_dashboard
RuleNamestring

The name of the alert rule.

SystemDefault_acs_rds_dashboard_CpuUsage
RuleIdstring

The ID of the alert rule.

a151cd6023eacee2f0978e03863cc1697c89508****
Periodstring

The aggregation period of monitoring data.

Unit: seconds.

60
ComparisonOperatorstring

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

  • >
  • <
  • >=
  • <=
  • =
  • =
>
EndTimestring

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

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

24
StartTimestring

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

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

00
Thresholdstring

The alert threshold.

90
Statisticsstring

The statistical method.

Average
Enablestring

Indicates whether the alert rule is enabled. Valid values:

  • true: The alert rule is enabled.
  • false: The alert rule is disabled.
true
AlertListarray<object>

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

object
SilenceTimestring

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

Unit: seconds.

86400
MetricNamestring

The name of the metric.

cpu_total
Webhookstring

The callback URL.

http://www.aliyun.com
ContactGroupsstring

The alert contact group.

ECS_Group
Namespacestring

The namespace of the Alibaba Cloud service.

acs_ecs_dashboard
EffectiveIntervalstring

The time period during which the alert rule is effective.

00:00-23:59
NoEffectiveIntervalstring

The time period during which the alert rule is ineffective.

00:00-06:00
MailSubjectstring

The subject of the alert notification email.

ECS_Bucket
RuleNamestring

The name of the alert rule.

myAlert
RuleIdstring

The ID of the alert rule.

ruleIdxxxx
Periodstring

The aggregation period of monitoring data.

Unit: seconds.

60
AlertStatestring

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 found.
OK
Dimensionsstring

The monitoring data of the specified resource.

""
EnableStateboolean

Indicates whether the alert rule is enabled. Valid values:

  • true: The alert rule is enabled.
  • false: The alert rule is disabled.
true
Resourcesstring

The resources that are associated with the alert rule.

[{"resource":"_ALL"}]
Escalationsobject

The conditions for triggering different levels of alerts.

Infoobject

The conditions for triggering Info-level alerts.

ComparisonOperatorstring

The 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
GreaterThanThreshold
Timesstring

The consecutive number of times

for which the metric value meets the alert condition before an Info-level alert is triggered.

3
Thresholdstring

The threshold for Info-level alerts.

95
Statisticsstring

The statistical methods for Info-level alerts.

Average
Warnobject

The conditions for triggering Warn-level alerts.

ComparisonOperatorstring

The operator that is used to compare the metric value with the threshold for Warn-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
GreaterThanThreshold
Timesstring

The consecutive number of times

for which the metric value meets the alert condition before a Warn-level alert is triggered.

3
Thresholdstring

The threshold for Warn-level alerts.

80
Statisticsstring

The statistical methods for Warn-level alerts.

Average
Criticalobject

The trigger condition for Critical-level alerts.

ComparisonOperatorstring

The 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
GreaterThanThreshold
Timesstring

The consecutive number of times for which the metric value meets the alert condition before a Critical-level alert is triggered.

3
Thresholdstring

The threshold for Critical-level alerts.

99
Statisticsstring

The statistical methods for Critical-level alerts.

Average

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "The Request is not authorization.",
  "RequestId": "F82E6667-7811-4BA0-842F-5B2DC42BBAAD",
  "Success": true,
  "Datapoints": {
    "Alarm": [
      {
        "SilenceTime": "86400",
        "MetricName": "cpu_total",
        "EvaluationCount": "3",
        "Webhook": "http://www.aliyun.com",
        "State": "Enable",
        "ContactGroups": "ECS_Group",
        "Namespace": "acs_ecs_dashboard",
        "RuleName": "SystemDefault_acs_rds_dashboard_CpuUsage",
        "RuleId": "a151cd6023eacee2f0978e03863cc1697c89508****",
        "Period": "60",
        "ComparisonOperator": ">",
        "EndTime": "24",
        "StartTime": "00",
        "Threshold": "90",
        "Statistics": "Average",
        "Enable": "true"
      }
    ]
  },
  "AlertList": {
    "Alert": [
      {
        "SilenceTime": "86400",
        "MetricName": "cpu_total",
        "Webhook": "http://www.aliyun.com",
        "ContactGroups": "ECS_Group",
        "Namespace": "acs_ecs_dashboard",
        "EffectiveInterval": "00:00-23:59",
        "NoEffectiveInterval": "00:00-06:00",
        "MailSubject": "ECS_Bucket",
        "RuleName": "myAlert",
        "RuleId": "ruleIdxxxx",
        "Period": "60",
        "AlertState": "OK",
        "Dimensions": "\"\"",
        "EnableState": true,
        "Resources": "[{\"resource\":\"_ALL\"}]",
        "Escalations": {
          "Info": {
            "ComparisonOperator": "GreaterThanThreshold",
            "Times": "3",
            "Threshold": "95",
            "Statistics": "Average"
          },
          "Warn": {
            "ComparisonOperator": "GreaterThanThreshold",
            "Times": "3",
            "Threshold": "80",
            "Statistics": "Average"
          },
          "Critical": {
            "ComparisonOperator": "GreaterThanThreshold",
            "Times": "3",
            "Threshold": "99",
            "Statistics": "Average"
          }
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400ParameterInvalid%s-
401AccessDeniedExceptionYou donot have sufficient access to perform this action.-
402LimitExceededThe quota for this customer had been reached.-
403AccessForbiddenThe X.509 certificate or cms access key ID provided does not exist in our records.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history