feat(运维监控): 新增K8S异常事件站内信通知功能

1. 实现K8S Warning类型异常事件自动监控和站内信通知
2. 添加定时任务,每10秒执行一次事件检测
3. 集成ES查询和站内信发送能力
4. 仅处理Warning类型K8S事件(排除异常原因为"Unhealthy"的事件)
5. 处理最近300秒内且未发送通知的事件(通过sendNotification字段判断)
This commit is contained in:
OTTO 2025-11-06 17:17:15 +08:00
parent 93ed7838e6
commit 7fbfbdaf8d
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ public class ESQueryUtils {
Date endTime = DateUtils.getNowDate();
long endTimeSec = endTime.getTime() / 1000;
// 开始时间为当前时间减去1小时
long startTimeSec = endTimeSec - 30 * 60;
long startTimeSec = endTimeSec - 300;
JSONObject timeRange = new JSONObject();
timeRange.put("gte", new Date(startTimeSec * 1000));
timeRange.put("lte", endTime);