Authored by simba

Merge branch 'master' of http://git.yoho.cn/ops/monitor-service

... ... @@ -9,200 +9,14 @@ import org.springframework.stereotype.Component;
@Component("snsMobileConfig")
public class SnsMobileConfig {
/********************** 支付回调手机号 **********************/
@Value("${base_mobile}")
private String baseMobile;
@Value("${sendsms.alarm.paycallback}")
private String payCallBack;
public String getBaseMobile() {
return baseMobile;
}
/********************** 支付回调手机号 ********************/
/********************* 订单异常手机号 ***********************/
@Value("${sendsms.alarm.mobile.orderexception}")
private String orderException;
/********************* 订单异常手机号 ***********************/
/******************* 用户行为异常手机号 ***************/
@Value("${sendsms.alarm.mobile.userbehaviour}")
private String userBehaviour;
/******************** 用户行为异常手机号 **************/
/******************** 数据库异常手机号 *************/
@Value("${sendsms.alarm.mobile.dbexception}")
private String dbException;
/******************* 数据库异常手机号 **************/
/****************** 服务异常告警手机号 ***************/
@Value("${sendsms.alarm.mobile.serviceexception.product}")
private String serviceExcptnProduct;
@Value("${sendsms.alarm.mobile.serviceexception.search}")
private String serviceExcptnSearch;
@Value("${sendsms.alarm.mobile.serviceexception.guang}")
private String serviceExcptnGuang;
@Value("${sendsms.alarm.mobile.serviceexception.users}")
private String serviceExcptnUsers;
@Value("${sendsms.alarm.mobile.serviceexception.order}")
private String serviceExcptnOrder;
@Value("${sendsms.alarm.mobile.serviceexception.sns}")
private String serviceExcptnSns;
@Value("${sendsms.alarm.mobile.serviceexception.promotion}")
private String serviceExcptnPromotion;
@Value("${sendsms.alarm.mobile.serviceexception.message}")
private String serviceExcptnMessage;
@Value("${sendsms.alarm.mobile.serviceexception.resources}")
private String serviceExcptnResources;
/******************** 服务异常告警手机号 ******************/
/********************Monitor模块告警手机号************************/
@Value("${sendsms.alarm.mobile.monitor.exception}")
private String monitorException;
/********************Monitor模块告警手机号************************/
/*******************Logs模块告警手机号************************/
@Value("${sendsms.alarm.mobile.logs.sns_send_failed}")
private String logsSnsSendFailed;
/*******************Logs模块告警手机号************************/
/*********************OpsManager开发程序员 手机号***************************/
@Value("${sendsms.alarm.mobile.ops_manager.developer}")
private String opsManagerDeveloper;
/*********************OpsManager开发程序员 手机号***************************/
/**
* dnspod sms
*/
@Value("${dnspod.mobile}")
private String dnspodMobile;
/**
* switch nginxConfig sms
*/
@Value("${nginx.config.switch.mobile}")
private String switchNginxConfigMobile;
/**
* jmxtrans sms
*/
@Value("${jmxtrans.mobile}")
private String jmxtransMobile;
@Value("${orderinfocheck.mobile}")
private String orderinfocheckMobile;
@Value("${base_mobile}")
private String baseMobile;
public String getOrderinfocheckMobile() {
return orderinfocheckMobile;
}
public String getPayCallBack() {
return payCallBack;
}
public String getOrderException() {
return orderException;
}
public String getUserBehaviour() {
return userBehaviour;
}
public String getDbException() {
return dbException;
}
public String getServiceExcptnProduct() {
return serviceExcptnProduct;
}
public String getServiceExcptnSearch() {
return serviceExcptnSearch;
}
public String getServiceExcptnGuang() {
return serviceExcptnGuang;
}
public String getServiceExcptnUsers() {
return serviceExcptnUsers;
}
public String getServiceExcptnOrder() {
return serviceExcptnOrder;
}
public String getServiceExcptnSns() {
return serviceExcptnSns;
}
public String getServiceExcptnPromotion() {
return serviceExcptnPromotion;
}
public String getServiceExcptnMessage() {
return serviceExcptnMessage;
}
public String getServiceExcptnResources() {
return serviceExcptnResources;
}
public String getDnspodMobile() {
return dnspodMobile;
}
public void setDnspodMobile(String dnspodMobile) {
this.dnspodMobile = dnspodMobile;
}
public String getJmxtransMobile() {
return jmxtransMobile;
}
public void setJmxtransMobile(String jmxtransMobile) {
this.jmxtransMobile = jmxtransMobile;
}
public String getSwitchNginxConfigMobile() {
return switchNginxConfigMobile;
}
public void setSwitchNginxConfigMobile(String switchNginxConfigMobile) {
this.switchNginxConfigMobile = switchNginxConfigMobile;
}
public String getOpsManagerDeveloper() {
return opsManagerDeveloper;
}
public String getMonitorException() {
return monitorException;
}
public String getLogsSnsSendFailed() {
return logsSnsSendFailed;
}
public String getBaseMobile() {
return baseMobile;
}
public void setBaseMobile(String baseMobile) {
this.baseMobile = baseMobile;
}
public void setBaseMobile(String baseMobile) {
this.baseMobile = baseMobile;
}
}
... ...
... ... @@ -94,7 +94,7 @@ public class AlarmMsgServiceImpl implements AlarmMsgService {
if (result == null || !("01" .equals(result.split(",")[0]) || "00" .equals(result.split(",")[0]) || "03" .equals(result.split(",")[0]))) {
logger.error("发送短信失败,短信内容|" + JSONArray.toJSONString(smsMap));
smsMap.put("Content", URLEncoder.encode("【有货运维】发送短信告警失败!!!", "UTF-8"));
smsMap.put("DesMobile", snsMobileConfig.getOpsManagerDeveloper());
smsMap.put("DesMobile", snsMobileConfig.getBaseMobile());
// 短信发送失败 发送短信给开发回来改bug
httpRestClientService.get(sendsmsConfig.getSendsmsUrl(), smsMap, String.class);
return false;
... ...
... ... @@ -18,7 +18,7 @@ public class AlarmMsgComp {
SnsMobileConfig snsMobileConfig;
public void doAlarm(String subject, String content) {
alarmMsgService.sendSms(subject, content, snsMobileConfig.getOpsManagerDeveloper());
alarmMsgService.sendSms(subject, content, snsMobileConfig.getBaseMobile());
}
}
... ...
... ... @@ -80,7 +80,7 @@ public class ZkMonitorHandleServiceImpl implements IZkMonitorHandleService {
return;
}
String alarmMsg="zookeeper"+alarmList.size()+"台连接失败,请及时查看!";
alarmMsgService.sendSms("zookeeper",alarmMsg, snsMobileConfig.getOpsManagerDeveloper());
alarmMsgService.sendSms("zookeeper",alarmMsg, snsMobileConfig.getBaseMobile());
log.info("task end...");
}
... ...
... ... @@ -4,59 +4,7 @@ sendsms.username=yohoyw
sendsms.pwd=NCftHmJ9
sendsms.notice.productid=8
base_mobile=15905144483,18751986615,18652008443
base_mobile=15905144483,18751986615,18502542319
#------------------------------------------支付回调手机号------------------------------------------------
sendsms.alarm.paycallback=15905144483,18751986615,18652008443
#------------------------------------------支付回调手机号------------------------------------------------
#------------------------------------------订单异常手机号------------------------------------------------
sendsms.alarm.mobile.orderexception=15905144483,13585196262,18652008443
#------------------------------------------订单异常手机号------------------------------------------------
#------------------------------------------用户行为异常手机号------------------------------------------------
sendsms.alarm.mobile.userbehaviour=15905144483,18001582955
#------------------------------------------用户行为异常手机号------------------------------------------------
#------------------------------------------数据库异常手机号------------------------------------------------
sendsms.alarm.mobile.dbexception=15905144483,18652008443,18751986615,13811102093
#------------------------------------------数据库异常手机号------------------------------------------------
#-------------------------------------------服务异常告警手机号----------------------------------------------------
sendsms.alarm.mobile.serviceexception.product=15905144483,18652925653,13451938602,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.search=15905144483,18551640215,18652925653,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.guang=15905144483,18001582955,18652925653,18751986615,18652008443,18551607734,15651035157,13951882433
sendsms.alarm.mobile.serviceexception.users=15905144483,18001582955,18652925653,18751986615,18652008443,13951882433,15651035157,18551607734
sendsms.alarm.mobile.serviceexception.order=15905144483,15950561359,13951634768,18652925653,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.sns=15905144483,13451938602,18652925653,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.promotion=15905144483,18652925653,13451938602,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.message=15905144483,18001582955,18652925653,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.resources=15905144483,15950561359,18652925653,18751986615,18652008443
#-------------服务异常告警手机号-------------------
#---------------------Monitor异常数据告警手机号------------------
sendsms.alarm.mobile.monitor.exception=15905144483,18751986615
#---------------------Monitor异常数据告警手机号------------------
#-----------------------------Logs告警模块---------------------------
#短信发送失败量超过阀值 告警手机号
sendsms.alarm.mobile.logs.sns_send_failed=15905144483,18751986615,18652008443,18001582955
#-----------------------------Logs告警模块--------------------------
#-----------------------------监控系统开发人员--------------------------
sendsms.alarm.mobile.ops_manager.developer=15905144483
#-----------------------------监控系统开发人员--------------------------
dnspod.mobile=15905144483,18652008443,18751986615
jmxtrans.mobile=15905144483,18751986615
nginx.config.switch.mobile=15905144483,18652008443,18751986615
#订单校验失败
orderinfocheck.mobile=15905144483,18652008443,15950561359,13902496867,18511020499
nginx.error.mobile=15905144483,18502542319,18751986615
... ...
... ... @@ -4,65 +4,7 @@ sendsms.username=yoho
sendsms.pwd=E
sendsms.notice.productid=8
#---------------国都短信业务api参数----------------------
sendsms.guodu.Url=http://221.179.180.158:9007/QxtSms/QxtFirewall
sendsms.guodu.OperID=yoho
sendsms.guodu.OperPass=EMKVpwoJ
#---------------国都短信业务api参数----------------------
base_mobile=15905144483
base_mobile=15905144483,18751986615,18652008443
#------------------------------------------支付回调手机号------------------------------------------------
sendsms.alarm.paycallback=15905144483,18751986615,18652008443
#------------------------------------------支付回调手机号------------------------------------------------
#------------------------------------------订单异常手机号------------------------------------------------
sendsms.alarm.mobile.orderexception=15905144483,13585196262,18652008443
#------------------------------------------订单异常手机号------------------------------------------------
#------------------------------------------用户行为异常手机号------------------------------------------------
sendsms.alarm.mobile.userbehaviour=15905144483,18001582955
#------------------------------------------用户行为异常手机号------------------------------------------------
#------------------------------------------数据库异常手机号------------------------------------------------
sendsms.alarm.mobile.dbexception=15905144483,18652008443,18751986615,13811102093
#------------------------------------------数据库异常手机号------------------------------------------------
#-------------------------------------------服务异常告警手机号----------------------------------------------------
sendsms.alarm.mobile.serviceexception.product=15905144483,18652925653,13451938602,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.search=15905144483,18551640215,18652925653,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.guang=15905144483,18001582955,18652925653,18751986615,18652008443,18551607734,15651035157,13951882433
sendsms.alarm.mobile.serviceexception.users=15905144483,18001582955,18652925653,18751986615,18652008443,13951882433,15651035157,18551607734
sendsms.alarm.mobile.serviceexception.order=15905144483,15950561359,13951634768,18652925653,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.sns=15905144483,13451938602,18652925653,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.promotion=15905144483,18652925653,13451938602,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.message=15905144483,18001582955,18652925653,18751986615,18652008443
sendsms.alarm.mobile.serviceexception.resources=15905144483,15950561359,18652925653,18751986615,18652008443
#-------------服务异常告警手机号-------------------
#---------------------Monitor异常数据告警手机号------------------
sendsms.alarm.mobile.monitor.exception=15905144483,18751986615
#---------------------Monitor异常数据告警手机号------------------
#-----------------------------Logs告警模块---------------------------
#短信发送失败量超过阀值 告警手机号
sendsms.alarm.mobile.logs.sns_send_failed=15905144483,18751986615,18652008443,18001582955
#-----------------------------Logs告警模块--------------------------
#-----------------------------监控系统开发人员--------------------------
sendsms.alarm.mobile.ops_manager.developer=15905144483
#-----------------------------监控系统开发人员--------------------------
dnspod.mobile=15905144483,18652008443,18751986615
jmxtrans.mobile=15905144483,18751986615
nginx.config.switch.mobile=15905144483,18652008443,18751986615
#订单校验失败
orderinfocheck.mobile=15905144483,18652008443,15950561359,13902496867,18511020499
nginx.error.mobile=15905144483,18502542319,18751986615
... ...
... ... @@ -27,7 +27,7 @@ public class MessageTest {
@Test
public void testSendMsg(){
alarmMsgService.sendSms("java_api","test", snsMobileConfig.getOpsManagerDeveloper());
alarmMsgService.sendSms("java_api","test", snsMobileConfig.getBaseMobile());
}
}
... ...