...
|
...
|
@@ -46,10 +46,10 @@ public class MemcachedMonitorImpl { |
|
|
@Autowired
|
|
|
private IMObjectInfoService mobjectService;
|
|
|
|
|
|
@Getter
|
|
|
@Autowired
|
|
|
private AlarmMsgService alarmMsgService;
|
|
|
|
|
|
@Getter
|
|
|
@Autowired
|
|
|
private SnsMobileConfig snsMobileConfig;
|
|
|
|
|
|
|
...
|
...
|
@@ -90,16 +90,16 @@ public class MemcachedMonitorImpl { |
|
|
client.shutdown();
|
|
|
} catch (IOException e) {
|
|
|
LOGGER.error("MemcachedMonitorImpl.doMonitor:creatr/shutdown memcached client occurs Exception: ", e.getMessage());
|
|
|
this.getAlarmMsgService().sendSms("Memcached", "Can not connect to Memcached " + monitorUrl.toString() + " .", this.getSnsMobileConfig().getBaseMobile());
|
|
|
alarmMsgService.sendSms("Memcached", "Can not connect to Memcached " + monitorUrl.toString() + " .", snsMobileConfig.getBaseMobile());
|
|
|
} catch (MemcachedException e) {
|
|
|
LOGGER.error("MemcachedMonitorImpl.doMonitor:get memcached status occurs Exception: ", e.getMessage());
|
|
|
this.getAlarmMsgService().sendSms("Memcached", "Can not get Memcached status" + monitorUrl.toString() + " .", this.getSnsMobileConfig().getBaseMobile());
|
|
|
alarmMsgService.sendSms("Memcached", "Can not get Memcached status" + monitorUrl.toString() + " .", snsMobileConfig.getBaseMobile());
|
|
|
} catch (InterruptedException e) {
|
|
|
LOGGER.error("MemcachedMonitorImpl.doMonitor:get memcached status occurs Exception: ", e.getMessage());
|
|
|
this.getAlarmMsgService().sendSms("Memcached", "Can not get Memcached status" + monitorUrl.toString() + " .", this.getSnsMobileConfig().getBaseMobile());
|
|
|
alarmMsgService.sendSms("Memcached", "Can not get Memcached status" + monitorUrl.toString() + " .", snsMobileConfig.getBaseMobile());
|
|
|
} catch (TimeoutException e) {
|
|
|
LOGGER.error("MemcachedMonitorImpl.doMonitor:get memcached status occurs Exception: ", e.getMessage());
|
|
|
this.getAlarmMsgService().sendSms("Memcached", "Can not get Memcached status" + monitorUrl.toString() + " .", this.getSnsMobileConfig().getBaseMobile());
|
|
|
alarmMsgService.sendSms("Memcached", "Can not get Memcached status" + monitorUrl.toString() + " .", snsMobileConfig.getBaseMobile());
|
|
|
}
|
|
|
//校验是否所有memcached都返回状态,对未返回状态的memcached短信告警
|
|
|
checkAllStatus(monitorUrl.toString().trim(), result);
|
...
|
...
|
@@ -178,7 +178,7 @@ public class MemcachedMonitorImpl { |
|
|
for (InetSocketAddress address: monitorUrlSet) {
|
|
|
failUrl.append(address.toString()+" ");
|
|
|
}
|
|
|
this.getAlarmMsgService().sendSms("Memcached", "Failed to get Memcached status" + failUrl.toString() + " .", this.getSnsMobileConfig().getBaseMobile());
|
|
|
alarmMsgService.sendSms("Memcached", "Failed to get Memcached status" + failUrl.toString() + " .", snsMobileConfig.getBaseMobile());
|
|
|
|
|
|
}
|
|
|
}
|
...
|
...
|
|