实现列表查询活跃告警和历史告警

This commit is contained in:
2025-11-10 13:41:26 +08:00
parent b94aa6137c
commit 37f515d4a8
13 changed files with 1792 additions and 70 deletions

View File

@@ -195,6 +195,8 @@ func (a *API) setupRoutes() {
{
thresholdGroup.POST("/:id/snooze", a.alarmController.SnoozeThresholdAlarm) // 忽略阈值告警
thresholdGroup.POST("/:id/cancel-snooze", a.alarmController.CancelSnoozeThresholdAlarm) // 取消忽略阈值告警
thresholdGroup.GET("/active-alarms", a.alarmController.ListActiveAlarms) // 获取活跃告警
thresholdGroup.GET("/historical-alarms", a.alarmController.ListHistoricalAlarms) // 获取历史告警
}
}
logger.Debug("告警相关接口注册成功 (需要认证和审计)")