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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeEventRuleList

The operation that you want to perform. Set the value to DescribeEventRuleList.

NamePrefix String No test

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

PageNumber String No 1

The number of the page to return.

Pages start from page 1. Default value: 1.

PageSize String No 10

The number of entries to return on each page.

A minimum of one entry can be returned on each page. Default value: 10.

GroupId String No 7378****

The ID of the application group.

Response parameters

Parameter Type Example Description
Code String 200

The HTTP status code.

Note The status code 200 indicates that the call was successful.
EventRules Array of EventRule

The event-triggered alert rules.

EventRule
Description String Default group event rule.

The description of the event-triggered alert rule.

EventPattern Array of EventPattern

The mode of the event-triggered alert rule.

EventPattern
CustomFilters String ECS123

The custom filter condition. If an event contains a specified keyword, the event triggers an alert.

EventTypeList List *

The type of the event-triggered alert rule.

* indicates all types of alert rules.

KeywordFilter Struct

The filter keyword.

Keywords List VMException

The keywords that are used to match events.

Relation String OR

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.
LevelList List CRITICAL

The level of the event. Valid values:

  • CRITICAL: critical
  • WARN: warning
  • INFO: information
NameList List ["Agent_Status_Stopped"]

The list of event names.

Product String CloudMonitor

The abbreviation of the service name.

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

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

EventType String SYSTEM

The type of the event. Valid values:

  • SYSTEM: system event
  • CUSTOM: custom event
GroupId String 7378****

The ID of the application group.

Name String test_DefaultEventRule_7378****

The name of the event-triggered alert rule.

SilenceTime Long 86400

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

State String ENABLED

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

  • ENABLED: enabled
  • DISABLED: disabled
Message String User not authorized to operate on the specified resource.

The error message.

RequestId String D0E6D82B-16B5-422A-8136-EE5BDC01E415

The ID of the request.

Success Boolean true

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
Total Integer 21

The total number of returned entries.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeEventRuleList
&<Common request parameters>

Sample success responses

XML format

<DescribeEventRuleListResponse>
	  <RequestId>C8308712-6E7A-4FA0-82AC-80D018DAD168</RequestId>
	  <Total>3</Total>
	  <EventRules>
		    <EventRule>
			      <EventPattern>
				        <NameList>
					          <NameList>*</NameList>
				        </NameList>
				        <LevelList>
					          <LevelList>CRITICAL</LevelList>
				        </LevelList>
				        <EventTypeList>
					          <EventTypeList>*</EventTypeList>
				        </EventTypeList>
				        <Product>CloudMonitor</Product>
			      </EventPattern>
			      <EventType>SYSTEM</EventType>
			      <State>ENABLED</State>
			      <Name>test123</Name>
		    </EventRule>
		    <EventRule>
			      <EventPattern>
				        <NameList>
					          <NameList>*</NameList>
				        </NameList>
				        <LevelList>
					          <LevelList>CRITICAL</LevelList>
					          <LevelList>WARN</LevelList>
				        </LevelList>
				        <Product>*</Product>
			      </EventPattern>
			      <Description>Default group event rule.</Description>
			      <EventType>SYSTEM</EventType>
			      <State>ENABLED</State>
			      <Name>test_DefaultEventRule_7378****</Name>
			      <GroupId>7378****</GroupId>
		    </EventRule>
		    <EventRule>
			      <EventPattern>
				        <NameList>
					          <NameList>*</NameList>
				        </NameList>
				        <LevelList>
					          <LevelList>CRITICAL</LevelList>
					          <LevelList>WARN</LevelList>
				        </LevelList>
				        <Product>*</Product>
			      </EventPattern>
			      <Description>Default group event rule.</Description>
			      <EventType>SYSTEM</EventType>
			      <State>ENABLED</State>
			      <Name>test123_DefaultEventRule_7301****</Name>
			      <GroupId>7301****</GroupId>
		    </EventRule>
	  </EventRules>
	  <Code>200</Code>
	  <Success>true</Success>
</DescribeEventRuleListResponse>

JSON format

{
	"RequestId": "C8308712-6E7A-4FA0-82AC-80D018DAD168",
	"Total": 3,
	"EventRules": {
		"EventRule": [
			{
				"EventPattern": {
					"NameList": {
						"NameList": [
							"*"
						]
					},
					"LevelList": {
						"LevelList": [
							"CRITICAL"
						]
					},
					"EventTypeList": {
						"EventTypeList": [
							"*"
						]
					},
					"Product": "CloudMonitor"
				},
				"EventType": "SYSTEM",
				"State": "ENABLED",
				"Name": "test123"
			},
			{
				"EventPattern": {
					"NameList": {
						"NameList": [
							"*"
						]
					},
					"LevelList": {
						"LevelList": [
							"CRITICAL",
							"WARN"
						]
					},
					"Product": "*"
				},
				"Description": "Default group event rule.",
				"EventType": "SYSTEM",
				"State": "ENABLED",
				"Name": "test_DefaultEventRule_7378****",
				"GroupId": "7378****"
			},
			{
				"EventPattern": {
					"NameList": {
						"NameList": [
							"*"
						]
					},
					"LevelList": {
						"LevelList": [
							"CRITICAL",
							"WARN"
						]
					},
					"Product": "*"
				},
				"Description": "Default group event rule.",
				"EventType": "SYSTEM",
				"State": "ENABLED",
				"Name": "test123_DefaultEventRule_7301****",
				"GroupId": "7301****"
			}
		]
	},
	"Code": "200",
	"Success": true
}

Error codes

HttpCode Error code Error message Description
404 ResourceNotFound The specified resource is not found. The error message returned because the specified resource is not found.

For a list of error codes, visit the API Error Center.