Operation description
If the specified rule name does not exist, an event-triggered alert rule is created. If the specified rule name exists, the specified event-triggered alert rule is modified.
In this example, the myRuleName
alert rule is created for the ecs
cloud service.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RuleName | string | Yes | The name of the event-triggered alert rule. | myRuleName |
GroupId | string | No | The ID of the application group to which the event-triggered alert rule belongs. | 7378**** |
EventType | string | No | The type of the event-triggered alert rule. Valid values:
| SYSTEM |
Description | string | No | The description of the event-triggered alert rule. | |
State | string | No | The status of the event-triggered alert rule. Valid values:
| ENABLED |
EventPattern | object [] | Yes | ||
EventTypeList | array | No | ||
string | No | The type of the event-triggered alert rule. Valid values of N: 1 to 50. Valid values:
| Exception | |
StatusList | array | No | ||
string | No | The status of the event-triggered alert rule. Valid values of N: 1 to 50. | Failed | |
Product | string | Yes | The type of the cloud service. Valid values of N: 1 to 50. Note
You can call the DescribeSystemEventMetaList operation to query the cloud services that support event-triggered alerts. For more information, see DescribeSystemEventMetaList .
| ecs |
LevelList | array | No | ||
string | No | The level of the event-triggered alert rule. Valid values of N: 1 to 50. Valid values:
| CRITICAL | |
NameList | array | No | ||
string | No | The name of the event-triggered alert rule. Valid values of N: 1 to 50. | Agent_Status_Stopped | |
CustomFilters | string | No | The keyword that is used to filter events. If the content of an event contains the specified keyword, an alert is automatically triggered. | Stopping |
SQLFilter | string | No | The SQL condition that is used to filter events. If the content of an event meets the specified SQL condition, an alert is automatically triggered. Note
The syntax of SQL event filtering is consistent with the query syntax of Log Service.
| 192.168.XX.XX and Executed |
SilenceTime | long | No | The mute period during which new alerts are not sent even if the trigger conditions are met. Unit: seconds. | 86400 |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": "200",
"Message": "The Request is not authorization.",
"Data": "1",
"RequestId": "0B47C47B-E68A-4429-BB23-370E91889C7D",
"Success": true
}
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 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2021-12-24 | The Error code has changed | see changesets | ||||||||
|