Consulta regras de alerta acionadas por eventos.
Debugging
Request parameters
|
Parameter |
Type |
Required |
Example |
Description |
|
Action |
String |
Yes |
DescribeEventRuleList |
A operação que você deseja executar. Defina o valor como DescribeEventRuleList. |
|
NamePrefix |
String |
No |
test |
O prefixo do nome da regra de alerta acionada por evento. |
|
PageNumber |
String |
No |
1 |
O número da página a ser retornada. As páginas começam na página 1. Valor padrão: 1. |
|
PageSize |
String |
No |
10 |
O número de entradas a serem retornadas por página. O mínimo é uma entrada por página. Valor padrão: 10. |
|
GroupId |
String |
No |
7378**** |
O ID do grupo de aplicativos. |
Response parameters
| Parameter | Type | Example | Description |
| Code | String | 200 | O código de status HTTP. Nota O código de status 200 indica que a chamada foi bem-sucedida. |
| EventRules | Array of EventRule | As regras de alerta acionadas por eventos. |
|
| EventRule | |||
| Description | String | Default group event rule. | A descrição da regra de alerta acionada por evento. |
| EventPattern | Array of EventPattern | O modo da regra de alerta acionada por evento. |
|
| EventPattern | |||
| CustomFilters | String | ECS123 | A condição de filtro personalizada. Se um evento contiver uma palavra-chave especificada, o evento aciona um alerta. |
| EventTypeList | List | * | O tipo da regra de alerta acionada por evento.
|
| KeywordFilter | Struct | A palavra-chave de filtro. |
|
| Keywords | List | VMException | As palavras-chave usadas para corresponder eventos. |
| Relation | String | OR | A relação entre múltiplas palavras-chave em uma condição. Valores válidos:
|
| LevelList | List | CRITICAL | O nível do evento. Valores válidos:
|
| NameList | List | ["Agent_Status_Stopped"] | A lista de nomes de eventos. |
| Product | String | CloudMonitor | A abreviação do nome do serviço. |
| SQLFilter | String | ycccluster1 and (i-23ij0o82612 or Executed1) or Asimulated not 222 | Indica que os logs são filtrados com base na instrução SQL especificada. Quando as condições especificadas são atendidas, um alerta é acionado. |
| EventType | String | SYSTEM | O tipo do evento. Valores válidos:
|
| GroupId | String | 7378**** | O ID do grupo de aplicativos. |
| Name | String | test_DefaultEventRule_7378**** | O nome da regra de alerta acionada por evento. |
| SilenceTime | Long | 86400 | O período de silêncio durante o qual novos alertas não são enviados mesmo que as condições de acionamento sejam atendidas. |
| State | String | ENABLED | O status da regra de alerta acionada por evento. Valores válidos:
|
| Message | String | User not authorized to operate on the specified resource. | A mensagem de erro. |
| RequestId | String | D0E6D82B-16B5-422A-8136-EE5BDC01E415 | O ID da solicitação. |
| Success | Boolean | true | Indica se a chamada foi bem-sucedida. Valores válidos:
|
| Total | Integer | 21 | O número total de entradas retornadas. |
Examples
Exemplos de solicitações
http(s)://[Endpoint]/?Action=DescribeEventRuleList
&<Common request parameters>
Exemplos de respostas bem-sucedidas
XML formato
<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 formato
{
"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. |
O erro foi retornado porque o recurso especificado não foi encontrado. |
Para ver a lista de códigos de erro, acesse o API Error Center.