Authored by jack

修改监控阈值

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