All Products
Search
Document Center

CloudMonitor:DescribeEventRuleList

Last Updated:Mar 01, 2024

Queries event-triggered 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

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NamePrefixstringNo

The prefix in the name of the event-triggered alert rule.

test
PageNumberstringNo

The page number.

Pages start from page 1. Default value: 1.

1
PageSizestringNo

The number of entries per page.

Pages start from page 1. Default value: 10.

10
GroupIdstringNo

The ID of the application group.

7378****
IsEnablebooleanNo

Specifies whether to enable the event-triggered alert rule. Valid values:

  • true (default)
  • false
true

Response parameters

ParameterTypeDescriptionExample
object

The event-triggered alert rules.

Codestring

The HTTP status code.

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

The error message returned.

User not authorized to operate on the specified resource.
RequestIdstring

The request ID.

D0E6D82B-16B5-422A-8136-EE5BDC01E415
Totalinteger

The total number of entries returned.

21
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
EventRulesobject []

The event-triggered alert rule.

EventTypestring

The type of the event-triggered alert rule. Valid values:

  • SYSTEM: system event-triggered alert rule
  • CUSTOM: custom event-triggered alert rule
SYSTEM
Descriptionstring

The description of the event-triggered alert rule.

Default group event rule.
GroupIdstring

The ID of the application group.

7378****
Namestring

The name of the event-triggered alert rule.

test_DefaultEventRule_7378****
Statestring

The status of the event-triggered alert rule. Valid values:

  • ENABLED
  • DISABLED
ENABLED
EventPatternobject []

The mode of the event-triggered alert rule.

Productstring

The abbreviation of the Alibaba Cloud service name.

CloudMonitor
LevelListarray

The levels of the event-triggered alerts.

string

The level of the event-triggered alert. Valid values:

  • CRITICAL
  • WARN
  • INFO
CRITICAL
EventTypeListarray

The types of the event-triggered alert rules.

string

The type of the event-triggered alert rule.

* indicates all types of alert rules.

*
NameListarray

The event names.

string

The event name.

["Agent_Status_Stopped"]
CustomFiltersstring

The custom filter conditions.

ECS123
KeywordFilterobject

The keyword for filtering.

Keywordsarray

The keywords that are used to match events.

string

The keyword.

VMException
Relationstring

The relationship between multiple keywords in a condition. Valid values:

  • OR: The relationship between keywords is OR.
  • NOT: The keyword is excluded. The value NOT indicates that all events that do not contain the keywords are matched.
OR
SQLFilterstring

Indicates that logs are filtered based on the specified SQL statement. If the specified conditions are met, an alert is triggered.

ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222
SilenceTimelong

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

86400

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "User not authorized to operate on the specified resource.",
  "RequestId": "D0E6D82B-16B5-422A-8136-EE5BDC01E415",
  "Total": 21,
  "Success": true,
  "EventRules": {
    "EventRule": [
      {
        "EventType": "SYSTEM",
        "Description": "Default group event rule.",
        "GroupId": "7378****",
        "Name": "test_DefaultEventRule_7378****",
        "State": "ENABLED",
        "EventPattern": {
          "EventPattern": [
            {
              "Product": "CloudMonitor",
              "LevelList": {
                "LevelList": [
                  "CRITICAL"
                ]
              },
              "EventTypeList": {
                "EventTypeList": [
                  "*"
                ]
              },
              "NameList": {
                "NameList": [
                  "[\"Agent_Status_Stopped\"]"
                ]
              },
              "CustomFilters": "ECS123",
              "KeywordFilter": {
                "Keywords": {
                  "Keywords": [
                    "VMException"
                  ]
                },
                "Relation": "OR"
              },
              "SQLFilter": "ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222"
            }
          ]
        },
        "SilenceTime": 86400
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterValueIllegal parameters.Illegal parameters.
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
500%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-09-19The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: IsEnable
2021-12-03The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.