|
@@ -26,8 +26,9 @@ public class MinitorApplication {
|
|
|
try {
|
|
|
if (errorTimes == 5 && requestTimes == 5) {
|
|
|
//钉钉群通知,报警
|
|
|
- boolean alarmResult = AlarmUtil.alarmByDingDing(ALARM_CONTENT, true, null);
|
|
|
- log.info("钉钉报警发送结果:" + alarmResult);
|
|
|
+// boolean alarmResult = AlarmUtil.alarmByDingDing(ALARM_CONTENT, true, null);
|
|
|
+// log.info("钉钉报警发送结果:" + alarmResult);
|
|
|
+ log.error("发送报警");
|
|
|
errorTimes = 0;
|
|
|
requestTimes = 0;
|
|
|
} else {
|
|
@@ -51,6 +52,6 @@ public class MinitorApplication {
|
|
|
// 计时器
|
|
|
Timer timer = new Timer();
|
|
|
// 添加执行任务(延迟 0s 执行,每 60s 执行一次)
|
|
|
- timer.schedule(timerTask, 0, 60000);
|
|
|
+ timer.schedule(timerTask, 0, 5000);
|
|
|
}
|
|
|
}
|