|
@@ -168,14 +168,21 @@ public class RyTask {
|
|
|
// BigDecimal storageAlarmSpace = totalSpace.multiply(storageAlarm);
|
|
|
if (usage.compareTo(storageAlarm.multiply(BigDecimal.valueOf(100))) < 0) {
|
|
|
emailService.sendEmail("linliaoyouyin@163.com", "存储空间预警", "服务器存储剩余空间" + server.getSysFiles().get(0).getFree());
|
|
|
+// emailService.sendEmail("zhanghongsen@cdms-china.com", "存储空间预警", "服务器存储剩余空间" + server.getSysFiles().get(0).getFree());
|
|
|
+// emailService.sendEmail("bgs-yjl@cdms-china.com", "存储空间预警", "服务器存储剩余空间" + server.getSysFiles().get(0).getFree());
|
|
|
}
|
|
|
} else {
|
|
|
// 发送邮件通知管理员
|
|
|
emailService.sendEmail("linliaoyouyin@163.com", "存储余量预警值参数错误", "存储余量预警值设置为" + config + "小于0或大于1");
|
|
|
+// emailService.sendEmail("zhanghongsen@cdms-china.com", "存储余量预警值参数错误", "存储余量预警值设置为" + config + "小于0或大于1");
|
|
|
+// emailService.sendEmail("bgs-yjl@cdms-china.com", "存储余量预警值参数错误", "存储余量预警值设置为" + config + "小于0或大于1");
|
|
|
}
|
|
|
} catch (NumberFormatException e) {
|
|
|
// 发送邮件通知管理员
|
|
|
- emailService.sendEmail("linliaoyouyin@163.com", "存储余量预警值参数错误", "存储余量预警值设置为" + (config == null || config.isEmpty() ? "空" : config) + "为非数字,设置错误。请重新设置。");
|
|
|
+ String text = "存储余量预警值设置为" + (config == null || config.isEmpty() ? "空" : config) + "为非数字,设置错误。请重新设置。";
|
|
|
+ emailService.sendEmail("linliaoyouyin@163.com", "存储余量预警值参数错误", text);
|
|
|
+// emailService.sendEmail("zhanghongsen@cdms-china.com", "存储余量预警值参数错误", text);
|
|
|
+// emailService.sendEmail("bgs-yjl@cdms-china.com", "存储余量预警值参数错误", text);
|
|
|
}
|
|
|
|
|
|
}
|