将公网可访问到的http服务地址作为回调地址,当触发告警时,监控中心会将告警推送到该地址。
创建webhook后您的系统可以收到UCloud告警信息。当有告警时,UCloud的系统会将告警信息以HTTP POST方式发送到指定URL,您可以对收到信息进行处理。
用户需要提供接收POST请求的HTTP服务,以处理UCloud发送的POST请求,并将该服务的URL注册到UCloud的告警系统中。
{
SessionID: "xxxxxxxxxxxxxxxxxxxxxxx",
Region: " cn-north-03",
ResourceType: "uhost",
ResourceId: "uhost-xxxx",
MetricName: "MemUsage",
AlarmTime: 1458733318,
RecoveryTime : 0,
Content:"【UCloud】告警:北京二 2023-08-05 11:30:04 uhost(ID:uhost-xxxx-0.0.0.0-)连接数(330.00个)<6000个(优刻得公司)"
}
{
SessionID: "xxxxxxxxxxxxxxxxxxxxxxx",
Region: "cn-north-03",
ResourceType: "uhost",
ResourceId: "uhost-xxxx",
MetricName: "MemUsage",
AlarmTime: 0,
RecoveryTime: 1458733318,
Content:"【UCloud】告警恢复:北京二 2023-08-05 11:30:04 uhost(ID:uhost-xxxx-0.0.0.0-)连接数(330.00个)<6000个(优刻得公司)"
}
Field | Explaination |
---|---|
SessionID | Session ID for this message |
Region | Region Name |
ResourceType | Resource Type |
MetricName | Metric Name for current warning |
AlarmTime | Alarm time |
RecoveryTime | Restory time |
Content | Warning content |
Response
我们这边需要收到这样的response, 表明用户成功接收推送信息,否则会再重试2次:
{
SessionID: "xxxxxxxxxxxxxxxxxxxxxxx",
RetCode: 0
}