All Products
Search
Document Center

CloudMonitor:DescribeEventRuleAttribute

Last Updated:Mar 01, 2024

Queries the details of an event-triggered alert rule.

Operation description

This topic provides an example to show how to query the details of an event-triggered alert rule named testRule.

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
RuleNamestringYes

The name of the event-triggered alert rule.

For information about how to obtain the name of an event-triggered alert rule, see DescribeEventRuleList .

testRule
SilenceTimestringNo

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

Unit: seconds. Default value: 86400, which indicates one day.

Note Only one alert notification is sent during each mute period even if the metric value exceeds the alert threshold several times.
86400

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code.

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

The error message.

The alert does not exist.
RequestIdstring

The request ID.

9AA3F210-C03D-4C86-8DB6-21C84FF692A1
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Resultobject

The details of the event-triggered alert rule.

EventTypestring

The event type. Valid values:

  • SYSTEM: system event
  • CUSTOM: custom event
SYSTEM
GroupIdstring

The ID of the application group.

3607****
Namestring

The name of the event-triggered alert rule.

test_DefaultEventRule_7378****
Descriptionstring

The description of the event-triggered alert rule.

Default group event rule.
Statestring

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

  • ENABLED
  • DISABLED
ENABLED
EventPatternobject

The event pattern. This parameter describes the trigger conditions of an event.

Productstring

The name of the cloud service.

CloudMonitor
LevelListarray
string

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

  • CRITICAL
  • WARN
  • INFO
["CRITICAL","WARN"]
StatusListarray
string

The status of the event.

Running
NameListarray
string

The name of the event.

Agent_Status_Running
EventTypeListarray

The types of the event-triggered alert rules.

string

The type of the event-triggered alert rule.

* indicates all types of alert rules.

*
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
KeywordFilterObjobject

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

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "The alert does not exist.",
  "RequestId": "9AA3F210-C03D-4C86-8DB6-21C84FF692A1",
  "Success": true,
  "Result": {
    "EventType": "SYSTEM",
    "GroupId": "3607****",
    "Name": "test_DefaultEventRule_7378****",
    "Description": "Default group event rule.",
    "State": "ENABLED",
    "EventPattern": {
      "Product": "CloudMonitor",
      "LevelList": {
        "LevelList": [
          "[\"CRITICAL\",\"WARN\"]    "
        ]
      },
      "StatusList": {
        "StatusList": [
          "Running"
        ]
      },
      "NameList": {
        "NameList": [
          "Agent_Status_Running"
        ]
      },
      "EventTypeList": {
        "EventTypeList": [
          "*"
        ]
      },
      "SQLFilter": "ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222",
      "KeywordFilterObj": {
        "Keywords": {
          "keyword": [
            "VMException"
          ]
        },
        "Relation": "OR"
      }
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterValueIllegal parameters.Illegal parameters.
403AccessForbiddenUser not authorized to operate on the specified resource.-
404%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-08-31The 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.
2023-03-10The 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.