Authored by jack

修改监控阈值

@@ -3,6 +3,6 @@ zabbix.jdbc.user=zabbix_ops @@ -3,6 +3,6 @@ zabbix.jdbc.user=zabbix_ops
3 zabbix.jdbc.password=yoho@zabbix 3 zabbix.jdbc.password=yoho@zabbix
4 zabbix_type=gateway,order,product,promotion,resources,sns,users,uic,message,redis,twemproxy,memcached,rabbitmq 4 zabbix_type=gateway,order,product,promotion,resources,sns,users,uic,message,redis,twemproxy,memcached,rabbitmq
5 zabbix_cpu_alarm=60.00 5 zabbix_cpu_alarm=60.00
6 -zabbix_mem_alarm=0.3 6 +zabbix_mem_alarm=0.2
7 zabbix_net_alarm=300 7 zabbix_net_alarm=300
8 8
@@ -41,7 +41,7 @@ import java.util.concurrent.ThreadFactory; @@ -41,7 +41,7 @@ import java.util.concurrent.ThreadFactory;
41 @EnableScheduling 41 @EnableScheduling
42 public class ZabbixAlarm { 42 public class ZabbixAlarm {
43 43
44 - private static String ALARMTEMPLATE = "时间:%s,ip:%s,CPU使用率:%s,可用内存/总内存(MB):%s,输入带宽:%.2fMbps,输出带宽:%.2fMbps"; 44 + private static String ALARMTEMPLATE = "时间:%s,ip:%s,CPU使用率:%.2f\'%\',可用内存/总内存(MB):%s,输入带宽:%.2fMbps,输出带宽:%.2fMbps";
45 45
46 public static final Logger DEBUG = LoggerFactory.getLogger(ZabbixAlarm.class); 46 public static final Logger DEBUG = LoggerFactory.getLogger(ZabbixAlarm.class);
47 47
@@ -254,7 +254,7 @@ public class ZabbixAlarm { @@ -254,7 +254,7 @@ public class ZabbixAlarm {
254 254
255 String nowString = DateTime.now().toString("yyyy-MM-dd HH:mm:ss"); 255 String nowString = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
256 256
257 - String alarmInfo = String.format(ALARMTEMPLATE, nowString, ip, String.valueOf(100 - idleCpu), String.valueOf(avMem) + " / " + String.valueOf(toMem), inNet, outNet); 257 + String alarmInfo = String.format(ALARMTEMPLATE, nowString, ip, 100 - idleCpu, String.valueOf(avMem) + " / " + String.valueOf(toMem), inNet, outNet);
258 258
259 DEBUG.info("Alarm vm info {}", alarmInfo); 259 DEBUG.info("Alarm vm info {}", alarmInfo);
260 260