Callback Interface
Definition
The http service address accessible to the public network serves as the callback address. When an alarm is triggered, the monitoring center will push the alarm to this address.
After creating a webhook, your system can receive UCloud Global alarm information. When there is an alarm, UCloud Global‘s system will send the alarm information to the designated URL by HTTP POST method, and you can handle the received information.
Condition
Users need to provide an HTTP service that receives POST requests to handle the POST requests sent by UCloud Global, and register the URL of this service with UCloud Global‘s alarm system.
JSON Body Example
Alarm
{
SessionID: "xxxxxxxxxxxxxxxxxxxxxxx",
Region: " cn-north-03",
ResourceType: "uhost",
ResourceId: "uhost-xxxx",
MetricName: "MemUsage",
AlarmTime: 1458733318,
RecoveryTime : 0,
Content:"【UCloud Global】Alarm: Beijing Two 2023-08-05 11:30:04 uhost(ID:uhost-xxxx-0.0.0.0-) Connection number(330.00)<6000 (UCloud)"
}
Recovery
{
SessionID: "xxxxxxxxxxxxxxxxxxxxxxx",
Region: "cn-north-03",
ResourceType: "uhost",
ResourceId: "uhost-xxxx",
MetricName: "MemUsage",
AlarmTime: 0,
RecoveryTime: 1458733318,
Content:"【UCloud Global】Alarm Recovery: Beijing Two 2023-08-05 11:30:04 uhost(ID:uhost-xxxx-0.0.0.0-) Connection number(330.00)<6000 (UCloud)"
}
Field Explaination
Field | Explaination |
---|---|
SessionID | Session ID for this message |
Region | Region Name |
ResourceType | Resource Type |
MetricName | Metric Name for current warning |
AlarmTime | Alarm time |
RecoveryTime | Recovery time |
Content | Warning content |
Response
We need to receive such a response, indicating that the user has successfully received the push information, otherwise it will retry 2 times:
{
SessionID: "xxxxxxxxxxxxxxxxxxxxxxx",
RetCode: 0
}