Queries the resources for which active alerts are triggered based on an alert rule.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RuleId | string | No | The ID of the alert rule. For information about how to obtain the ID of an alert rule, see DescribeMetricRuleList . | putNewAlarm_user_7e78d765-0e3e-4671-ba6d-7ce39108**** |
GroupId | string | No | The ID of the application group. For information about how to obtain the ID of an application group, see DescribeMonitorGroups . | 7671**** |
Page | integer | No | The page number. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Default value: 10. | 10 |
Namespace | string | No | The namespace of the cloud service. For more information about the namespaces of cloud services, see Appendix 1: Metrics. | acs_mns_new |
Dimensions | string | No | The dimensions that specify the resources whose monitoring data you want to query. | {\"userId\":\"120886317861****\",\"region\":\"cn-huhehaote\",\"queue\":\"test-0128\"} |
AlertBeforeTime | string | No | Queries the alerts that were triggered before the specified time. Timestamps in milliseconds are supported. | 1698827400000 |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": 200,
"Message": "The request processing has failed due to some unknown error.",
"RequestId": "0724011B-D9E0-4B2F-8C51-F17A894CC42C",
"Total": 2,
"Success": true,
"Resources": {
"Resource": [
{
"MetricName": "ActiveMessages",
"RetryTimes": "3",
"MetricValues": "{\\\"timestamp\\\":1623727500000,\\\"Sum\\\":926,\\\"value\\\":463,\\\"Maximum\\\":463,\\\"Minimum\\\":463,\\\"Average\\\":463,\\\"SampleCount\\\":2,\\\"userId\\\":\\\"120886317861****\\\",\\\"region\\\":\\\"cn-huhehaote\\\",\\\"queue\\\":\\\"test-0128\\\"}",
"Namespace": "acs_mns_new",
"RuleName": "test123456789",
"RuleId": "putNewAlarm_user_7e78d765-0e3e-4671-ba6d-7ce39108****",
"ProductCategory": "mns",
"StartTime": "1622427900000",
"Resource": "userId=120886317861****,region=cn-huhehaote,queue=test-0128",
"LastModifyTime": "1622827900000",
"GroupId": "7671****",
"Dimensions": "{\\\"region\\\":\\\"cn-huhehaote\\\",\\\"queue\\\":\\\"test-0128\\\",\\\"userId\\\":\\\"120886317861****\\\"}",
"LastAlertTime": "1622427900000",
"Level": 3,
"Threshold": "10",
"Statistics": "Average",
"Enable": "true",
"Escalation": {
"Resource": [
{
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"PreCondition": ">=",
"Expression": "$Average>=10",
"Times": 1,
"Tag": "mns",
"Threshold": "10",
"Level": 3,
"ExpressionListJoin": "&&",
"ExpressionList": {
"ExpressionList": [
{
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"MetricName": "cpu_total",
"Period": "60",
"Statistics": "Average",
"Threshold": "90"
}
]
},
"ExpressionRaw": "$Average > ($instanceId == 'i-io8kfvcpp7x5****'? 80: 50)"
}
]
}
}
]
}
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | %s | %s |
500 | InternalError | The request processing has failed due to some unknown error. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-10-20 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||||||||||
|