All Products
Search
Document Center

CloudMonitor:DescribeProductsOfActiveMetricRule

Last Updated:Jul 26, 2024

Queries the cloud services for which the initiative alert feature is enabled.

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:DescribeProductsOfActiveMetricRuleget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
The current API does not require request parameters

Response parameters

ParameterTypeDescriptionExample
object

None.

Codeinteger

The HTTP status code.

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

The error message.

The Request is not authorization.
RequestIdstring

The request ID.

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

The information about the services for which one-click alert is enabled. Services are separated with commas (,). Valid values:

  • ecs: Elastic Compute Service (ECS)
  • rds: ApsaraDB RDS
  • slb: Server Load Balancer (SLB)
  • redis_standard: ApsaraDB for Redis of the standard architecture
  • redis_sharding: ApsaraDB for Redis of the cluster architecture
  • redis_splitrw: ApsaraDB for Redis of the read/write splitting architecture
  • mongodb: ApsaraDB for MongoDB of the replica set architecture
  • mongodb_sharding: ApsaraDB for MongoDB of the sharded cluster architecture
  • hbase: ApsaraDB for HBase
  • elasticsearch: Elasticsearch
  • opensearch: OpenSearch
ecs,rds
Successboolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.
true
AllProductInitMetricRuleListarray<object>

The information about the services for which one-click alert is enabled.

object

The information about the services for which one-click alert is enabled.

Productstring

The abbreviation of the service name.

ecs
AlertInitConfigListarray<object>

The initial alert rules that are generated after one-click alert is enabled for a service.

object

The initial alert rules that are generated after one-click alert is enabled for a service.

MetricNamestring

The metric name. For more information, see Appendix 1: Metrics.

cpu_total
EvaluationCountstring

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

3
Namespacestring

The namespace of the service. For more information, see Appendix 1: Metrics.

acs_rds_dashboard
Thresholdstring

The alert threshold.

90
Statisticsstring

The method used to calculate metric values that trigger alerts. For more information, see Appendix 1: Metrics.

Average
Periodstring

The aggregation period of monitoring data. Unit: minutes. For more information, see Appendix 1: Metrics.

1m
Levelstring

The alert level.

Valid values:

  • INFO

  • WARN

  • CRITICAL

CRITICAL
ComparisonOperatorstring

The operator that is used to compare the metric value with the threshold for Warn-level alerts.

Valid values:

  • LessThanThreshold: less than the threshold

  • GreaterThanLastWeek: greater than the metric value at the same time last week

  • LessThanOrEqualToThreshold: less than or equal to the threshold

  • NotEqualToThreshold: does not equal to the threshold

  • GreaterThanLastPeriod: greater than the metric value in the last monitoring cycle

  • GreaterThanYesterday: greater than the metric value at the same time yesterday

  • LessThanYesterday: less than the metric value at the same time yesterday

  • LessThanLastWeek: less than the metric value at the same time last week

  • GreaterThanOrEqualToThreshold: greater than or equal to the threshold

  • GreaterThanThreshold: greater than the threshold

  • LessThanLastPeriod: less than the metric value in the last monitoring cycle

GreaterThanOrEqualToThreshold

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "The Request is not authorization.",
  "RequestId": "F82E6667-7811-4BA0-842F-5B2DC42BBAAD",
  "Datapoints": "ecs,rds",
  "Success": true,
  "AllProductInitMetricRuleList": {
    "AllProductInitMetricRule": [
      {
        "Product": "ecs",
        "AlertInitConfigList": {
          "AlertInitConfig": [
            {
              "MetricName": "cpu_total",
              "EvaluationCount": "3",
              "Namespace": "acs_rds_dashboard",
              "Threshold": "90",
              "Statistics": "Average",
              "Period": "1m",
              "Level": "CRITICAL",
              "ComparisonOperator": "GreaterThanOrEqualToThreshold"
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
400InvalidParameterThe specified parameter is not valid.
403InvalidAuthorizationThe Request is not authorization.
406%s%s
500InternalErrorThe request processing has failed due to some unknown error.

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

Change history

Change timeSummary of changesOperation
2023-10-25The Error code has changed. The response structure of the API has changedView Change Details