forked from Gitlink/microservices
feat(运维监控): 新增K8S异常事件站内信通知功能
1. 实现K8S Warning类型异常事件自动监控和站内信通知 2. 添加定时任务,每10秒执行一次事件检测 3. 集成ES查询和站内信发送能力 4. 仅处理Warning类型K8S事件(排除异常原因为"Unhealthy"的事件) 5. 处理最近300秒内且未发送通知的事件(通过sendNotification字段判断)
This commit is contained in:
parent
93ed7838e6
commit
7fbfbdaf8d
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue