Consulta uma lista de alertas.
Experimente agora
Testar
Autorização RAM
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| PageNumber |
integer |
Sim |
O número da página. Valor padrão: 1. Valor mínimo: 1. Valor máximo: 30. |
1 |
| PageSize |
integer |
Sim |
O número de entradas por página. Valor padrão: 10. Valor máximo: 100. |
10 |
| BeginTime |
string |
Sim |
O início do intervalo de tempo a ser consultado. Especifique a hora no padrão ISO 8601 no formato yyyy-MM-dd'T'HH:mm:ssZ. A hora deve estar em UTC. |
2020-04-02T00:00:00+0800 |
| EndTime |
string |
Sim |
O fim do intervalo de tempo a ser consultado. Especifique a hora no padrão ISO 8601 no formato yyyy-MM-dd'T'HH:mm:ssZ. A hora deve estar em UTC. |
2020-04-04T00:00:00+0800 |
| RemindId |
integer |
Não |
O ID da regra de alerta personalizada. Este parâmetro entra em vigor se o parâmetro AlertRuleTypes estiver definido como USER_DEFINE. Você pode configurar este parâmetro ou o parâmetro BaselineId. |
9527 |
| AlertMethods |
string |
Não |
O método de notificação. Valores válidos:
Você pode especificar vários métodos de notificação. Separe-os com vírgulas (,). |
SMS,MAIL,PHONE |
| AlertUser |
string |
Não |
O ID da conta Alibaba Cloud usada pelo destinatário do alerta. |
12345 |
| AlertRuleTypes |
string |
Não |
O tipo da regra de alerta. Valores válidos: GLOBAL, USER_DEFINE e OTHER. O valor GLOBAL indica que a regra de alerta é uma regra de alerta global. O valor USER_DEFINE indica que a regra de alerta é personalizada por um usuário. O valor OTHER indica que a regra de alerta é uma regra de outro tipo. Você pode especificar vários tipos. Separe-os com vírgulas (,). |
GLOBAL,USER_DEFINE,OTHER |
| BaselineId |
integer |
Não |
O ID da linha de base. Este parâmetro entra em vigor se o parâmetro AlertRuleTypes estiver definido como GLOBAL. Você pode configurar este parâmetro ou o parâmetro RemindId. |
1234 |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Os parâmetros de resposta. |
||
| HttpStatusCode |
integer |
O código de status HTTP. |
200 |
| RequestId |
string |
O ID da solicitação. |
0000-ABCD-EFG**** |
| ErrorMessage |
string |
A mensagem de erro. |
The specified parameters are invalid. |
| ErrorCode |
string |
O código de erro. |
Invalid.Tenant.ConnectionNotExists |
| Success |
boolean |
Indica se a solicitação foi bem-sucedida. |
true |
| Data |
object |
As informações sobre os alertas retornados. |
|
| PageNumber |
string |
O número da página. |
1 |
| PageSize |
string |
O número de entradas por página. |
10 |
| TotalCount |
string |
O número total de alertas retornados. |
100 |
| AlertMessages |
array<object> |
Os alertas. |
|
|
array<object> |
Os dados retornados. |
||
| RemindId |
integer |
The ID of the custom alert rule that was triggered. This parameter is returned if the value of the Source parameter is REMIND_ALERT. |
1234 |
| AlertMessageStatus |
string |
The sending status of the notification. Valid values: READY_TO_SEND, SEND_FAIL, SEND_SUCCESS, and SEND_OVERLIMIT. The value READY_TO_SEND indicates that the notification is waiting to be sent. The value SEND_FAIL indicates that the notification fails to be sent. The value SEND_SUCCESS indicates that the notification is sent. The value SEND_OVERLIMIT indicates that the number of notifications that are sent exceeds the upper limit. |
READY_TO_SEND |
| AlertUser |
string |
The ID of the Alibaba Cloud used by the alert recipient. |
9527952795**** |
| AlertTime |
integer |
The timestamp when the alert was reported. |
1553531401000 |
| AlertMethod |
string |
The notification method. Valid values: MAIL, SMS, and PHONE. Only DataWorks Professional Edition and more advanced editions support the PHONE notification method. |
SMS |
| Source |
string |
The type of the alert. Valid values: REMIND_ALERT, TOPIC_ALERT, SLA_ALERT, NODE_CYCLE_ALERT, and NODE_LONELY_ALERT. The value REMIND_ALERT indicates that the alert is a custom alert. The value TOPIC_ALERT indicates that the alert is an event alert. The value SLA_ALERT indicates that the alert is a baseline alert. The value NODE_CYCLE_ALERT indicates that the alert is reported for a node dependency loop. The value NODE_LONELY_ALERT indicates that the alert is reported for isolated nodes. |
REMIND_ALERT |
| Content |
string |
The content of the alert. |
Node error |
| RemindName |
string |
The name of the custom alert rule that was triggered. This parameter is returned if the value of the Source parameter is REMIND_ALERT. |
Custom monitoring rule name |
| AlertId |
integer |
The alert ID. |
1234 |
| Instances |
array<object> |
The instances that triggered the custom alert rule. This parameter is returned if the value of the Source parameter is REMIND_ALERT. This parameter is left empty if the value of the Source parameter is not REMIND_ALERT. |
|
|
object |
The information about the instance. |
||
| Status |
string |
The status of the instance. Valid values: NOT_RUN, WAIT_TIME, WAIT_RESOURCE, RUNNING, CHECKING, CHECKING_CONDITION, FAILURE, and SUCCESS. The value NOT_RUN indicates that the instance is not run. The value WAIT_TIME indicates that the instance is waiting to be run. The value WAIT_RESOURCE indicates that the instance is waiting for resources. The value RUNNING indicates that the instance is running. The value CHECKING indicates that data quality is being checked for the node for which the instance is generated. The value CHECKING_CONDITION indicates that branch conditions are being checked for the node for which the instance is generated. The value FAILURE indicates that the instance fails to run. The value SUCCESS indicates that the instance is successfully run. |
NOT_RUN |
| InstanceId |
integer |
The instance ID. |
12345 |
| NodeName |
string |
The name of the node. |
Node name |
| NodeId |
integer |
The node ID. |
1234 |
| ProjectId |
integer |
The ID of the workspace to which the node belongs. |
1234 |
| Topics |
array<object> |
The events that triggered alerts. This parameter is returned if the value of the Source parameter is TOPIC_ALERT. This parameter is left empty if the value of the Source parameter is not TOPIC_ALERT. |
|
|
object |
The information about the event. |
||
| TopicName |
string |
The name of the event. |
9527 error |
| InstanceId |
integer |
The ID of the instance that triggered the event. |
12345 |
| TopicId |
integer |
The event ID. |
1234 |
| TopicOwner |
string |
The ID of the Alibaba Cloud account used by the event owner. |
9527952795**** |
| NodeId |
integer |
The ID of the node that triggered the event. |
1234 |
| TopicStatus |
string |
The status of the event. Valid values: IGNORE, NEW, FIXING, and RECOVER. The value IGNORE indicates that the event is ignored. The value NEW indicates that the event is a new event. The value FIXING indicates that the event is being handled. The value RECOVER indicates that the event is handled. |
FIXING |
| Nodes |
array<object> |
The nodes returned for different alert sources.
|
|
|
object |
The information about the node. |
||
| Owner |
string |
The ID of the Alibaba Cloud account used by the node owner. |
95279527952**** |
| NodeName |
string |
The name of the node. |
Node name |
| NodeId |
integer |
The node ID. |
1234 |
| ProjectId |
integer |
The ID of the workspace to which the node belongs. |
1234 |
| SlaAlert |
object |
The basic information about the baseline instance that triggered an alert. This parameter is returned if the value of the Source parameter is SLA_ALERT. This parameter is left empty if the value of the Source parameter is not SLA_ALERT. |
|
| Status |
string |
The status of the baseline. Valid values: ERROR, SAFE, DANGEROUS, and OVER. The value ERROR indicates that no nodes are associated with the baseline, or all nodes associated with the baseline are suspended. The value SAFE indicates that nodes are run before the alert duration begins. The value DANGEROUS indicates that nodes are still running after the alert duration ends but the committed completion time does not arrive. The value OVER indicates that nodes are still running after the committed completion time. |
SAFE |
| BaselineOwner |
string |
The ID of the Alibaba Cloud account used by the baseline owner. Multiple IDs are separated by commas (,). |
952795279**** |
| BaselineId |
integer |
The baseline ID. |
1234 |
| BaselineName |
string |
The name of the baseline. |
Baseline name |
| Bizdate |
integer |
The data timestamp of the baseline instance. |
1553443200000 |
| ProjectId |
integer |
The ID of the workspace to which the baseline belongs. |
1234 |
| InGroupId |
integer |
The ID of the cycle of the baseline instance. Valid values of the ID of an hour-level cycle: [1,24]. The ID of a day-level cycle is 1. |
1 |
Exemplos
Resposta de sucesso
JSON formato
{
"HttpStatusCode": 200,
"RequestId": "0000-ABCD-EFG****",
"ErrorMessage": "The specified parameters are invalid.",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Success": true,
"Data": {
"PageNumber": "1",
"PageSize": "10",
"TotalCount": "100",
"AlertMessages": [
{
"RemindId": 1234,
"AlertMessageStatus": "READY_TO_SEND",
"AlertUser": "9527952795****",
"AlertTime": 1553531401000,
"AlertMethod": "SMS",
"Source": "REMIND_ALERT",
"Content": "Node error",
"RemindName": "Custom monitoring rule name",
"AlertId": 1234,
"Instances": [
{
"Status": "NOT_RUN",
"InstanceId": 12345,
"NodeName": "Node name",
"NodeId": 1234,
"ProjectId": 1234
}
],
"Topics": [
{
"TopicName": "9527 error",
"InstanceId": 12345,
"TopicId": 1234,
"TopicOwner": "9527952795****",
"NodeId": 1234,
"TopicStatus": "FIXING"
}
],
"Nodes": [
{
"Owner": "95279527952****",
"NodeName": "Node name",
"NodeId": 1234,
"ProjectId": 1234
}
],
"SlaAlert": {
"Status": "SAFE",
"BaselineOwner": "952795279****",
"BaselineId": 1234,
"BaselineName": "Baseline name",
"Bizdate": 1553443200000,
"ProjectId": 1234,
"InGroupId": 1
}
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 500 | Forbidden.Not.Server | The dataworksAPI service is not available in this area. Please try it in another area. | |
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | No permission, please authorize |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.Api.Risk | The request for this resource has exceeded your daily available limit. | |
| 429 | Throttling.Resource | You have reached the limit for the resource. Please contact us by submitting a ticket. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.