Authored by fanzelei

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

... ... @@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
/**
* Created by yoho on 2016/6/15.
... ... @@ -36,6 +37,8 @@ public class MObjectInfoCtrl {
public static final String SPLITOP = ",";
public static final String AWS_PREFIX = "172.";
@Autowired
IMObjectInfoService mobjectService;
... ... @@ -55,15 +58,13 @@ public class MObjectInfoCtrl {
BaseResponse response = null;
if (0 == request.getIsGroup()) {
response = queryMHostInfoByIp(request);
} else {
response = queryMHostInfoByGroup(request);
}
response = queryMHostInfoByGroup(request);
return response;
}
private BaseResponse queryMHostInfoByIp(MObjectHostInfoReq request) {
private BaseResponse queryMHostInfoByGroup(MObjectHostInfoReq request) {
BaseResponse response = new BaseResponse();
MObjectHostInfoModel model = new MObjectHostInfoModel();
... ... @@ -74,97 +75,42 @@ public class MObjectInfoCtrl {
String selectIp = "";
String selectGroup = "";
int selectGroupId = 0;
String selectTag = "";
List<HostGroup> sourceGroupList = groupService.getListGroups();
if (!StringUtils.equals("0", request.getSelectIp())) {
HostInfo info = hostInfoService.getHostInfoByHostIp(request.getSelectIp());
selectIp = info.getHostIp();
selectGroupId = info.getGroupId();
//add blank tag
selectGroup = groupService.getHostGroupById(selectGroupId).getData().getGroupName();
HostGroup hostGroup = new HostGroup();
hostGroup.setGroupName(StringUtils.EMPTY);
} else {
if (sourceGroupList.size() > 0) {
selectGroup = sourceGroupList.get(0).getGroupName();
selectGroupId = sourceGroupList.get(0).getId();
sourceGroupList.add(hostGroup);
List<HostInfo> sourceHostList = hostInfoService.getHostInfosByTag("");
if (sourceHostList.size() > 0) {
selectIp = sourceHostList.get(0).getHostIp();
}
}
}
selectTag = request.getSelectGroup();
for (HostGroup group : sourceGroupList) {
groupList.add(group.getGroupName());
}
if (StringUtils.isNotBlank(selectGroup)) {
for (HostInfo info : hostInfoService.getHostInfosByTag("")) {
ipList.add(info.getHostIp());
}
}
model.setSelectIp(selectIp);
model.setSelectGroup(selectGroup);
model.setIpList(ipList);
model.setGroupList(groupList);
response.setData(model);
return response;
}
private BaseResponse queryMHostInfoByGroup(MObjectHostInfoReq request) {
BaseResponse response = new BaseResponse();
MObjectHostInfoModel model = new MObjectHostInfoModel();
List<String> groupList = new ArrayList<>();
List<String> ipList = new ArrayList<>();
String selectIp = "";
String selectGroup = "";
int selectGroupId = 0;
List<HostGroup> sourceGroupList = groupService.getListGroups();
for (HostGroup group : sourceGroupList) {
if (StringUtils.equals(group.getGroupName(), request.getSelectGroup())) {
selectGroupId = group.getId();
selectGroup = group.getGroupName();
}
}
for (HostGroup group : sourceGroupList) {
groupList.add(group.getGroupName());
}
List<HostInfo> hostInfos = hostInfoService.getHostInfosByTag(selectTag);
if (StringUtils.isNotBlank(selectGroup)) {
for (HostInfo info : hostInfoService.getHostInfosByTag("")) {
ipList.add(info.getHostIp());
}
for (HostInfo info : hostInfos) {
ipList.add(info.getHostIp());
}
selectIp = ipList.get(0);
model.setSelectIp(selectIp);
model.setSelectGroup(selectGroup);
model.setSelectGroup(selectTag);
model.setIpList(ipList);
model.setGroupList(groupList);
response.setData(model);
return response;
}
... ... @@ -336,6 +282,8 @@ public class MObjectInfoCtrl {
BeanUtils.copyProperties(request, info);
info.setMoName(buildMoName(request));
mobjectService.addMObjectInfo(info);
}
} catch (Exception e) {
... ... @@ -351,6 +299,32 @@ public class MObjectInfoCtrl {
}
public String buildMoName(MObjectInfoReq infoReq) {
String name = infoReq.getMoTypeName();
Random random = new Random();
if (infoReq.getMoHostIp().startsWith(AWS_PREFIX)) {
name = name.concat("_aws_");
} else {
name = name.concat("_qq_");
}
String tmpName = String.copyValueOf(name.toCharArray());
tmpName = tmpName.concat(Integer.toString(random.nextInt(100)));
while (mobjectService.checkMoNameExist(tmpName)) {
tmpName = String.copyValueOf(name.toCharArray());
tmpName = tmpName.concat(Integer.toString(random.nextInt(100)));
}
return tmpName;
}
@RequestMapping(value = "/delete", method = RequestMethod.POST)
public BaseResponse deleteMObject(@RequestBody MObjectInfoReq request) {
... ...
... ... @@ -23,7 +23,7 @@ public interface IMObjectInfoService {
void updateMObjectInfo(MObjectInfo info);
boolean checkMoNameExist(String name);
List<MObjectInfo> queryMObjectsInfoByTypes(List<Integer> typeIds);
... ...
... ... @@ -105,6 +105,17 @@ public class MObjectInfoServiceImpl implements IMObjectInfoService {
}
@Override
public boolean checkMoNameExist(String name) {
List<MObjectInfo> mObjectInfoList = mObjectInfoMapper.getMoInfosByAlias(name);
if (0 != mObjectInfoList.size()) {
return true;
} else {
return false;
}
}
@Override
public List<MObjectInfo> queryMObjectsInfoByTypes(List<Integer> typeIds) {
return mObjectInfoMapper.selectMObjectsInfoByTypes(typeIds);
}
... ...
... ... @@ -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;
... ...
... ... @@ -11,6 +11,28 @@ import java.util.Map;
public class RedisCommonUtil {
public static long getRedisMaxMemory(String host,int port){
Map<String,Object> result=null;
Jedis client =null;
try {
client=new Jedis(host, port);
result=new HashMap<String, Object>();
List<String> configList=client.configGet("maxmemory");
long maxmemory=0;
if(!CollectionUtils.isEmpty(configList)&&configList.size()==2){
maxmemory=Long.valueOf(configList.get(1));
}
return maxmemory;
}catch (Exception e){
return 0;
}finally {
if(client!=null){
client.close();
}
}
}
public static Map<String,Object> getRedisInfo(String host,int port){
Map<String,Object> result=null;
Jedis client =null;
... ... @@ -21,12 +43,6 @@ public class RedisCommonUtil {
return null;
}
result=new HashMap<String, Object>();
List<String> configList=client.configGet("maxmemory");
int maxmemory=0;
if(!CollectionUtils.isEmpty(configList)&&configList.size()==2){
maxmemory=Integer.valueOf(configList.get(1));
}
result.put("maxmemory",maxmemory);
String[] arr = redisInfo.split("\r\n");
for (String str : arr) {
if (str.startsWith("#")||str.startsWith("\r\n")) {
... ...
... ... @@ -44,6 +44,8 @@ public class NginxScanTask {
}
}
InterVar.moMaps.clear();
for (MObjectInfo info : mObjectInfoList) {
InterVar.moMaps.put(info.getMoId(), info);
... ...
... ... @@ -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());
}
}
... ...
... ... @@ -96,19 +96,17 @@ public class RedisMonitorHandleServiceImpl implements IRedisMonitorHandleService
List<String> ipList=null;
for(MObjectInfo obj:redisProxymList){
paramMonitor=new StringBuffer();
String[] ports=null;
if(StringUtils.isBlank(obj.getMoTags())){
ports=obj.getMoTags().split(",");
}
String[] ports=obj.getMoTags().split(",");;
log.info("two port is {}",obj.getMoTags());
String result= TelnetUtils.getResult(obj.getMoHostIp(),Integer.valueOf(ports[0]));
redisMonitor = new RedisMonitor();
if(StringUtils.isNotBlank(result)){
paramMonitor.append("1,");
boolean proxyFlag=RedisCommonUtil.getRedisIsSlave(obj.getMoHostIp(),Integer.valueOf(ports[1]));
if(proxyFlag){
paramMonitor.append("OK,");
paramMonitor.append("探测成功;");
}else{
paramMonitor.append("ERROR,");
paramMonitor.append("探测失败;");
}
//取舍成功重新设为1
JSONObject response=JSONObject.parseObject(result);
... ... @@ -117,10 +115,10 @@ public class RedisMonitorHandleServiceImpl implements IRedisMonitorHandleService
int curr_connections=(Integer)response.get("curr_connections");
if(total_connections>0){
//总连接数
paramMonitor.append(total_connections+",");
paramMonitor.append("总连接数:"+total_connections+";");
}
if (total_connections > 0) {
paramMonitor.append(curr_connections+",");
paramMonitor.append("当前连接数:"+curr_connections+";");
}
//查看代理下的redis
JSONObject alpha=response.getJSONObject("alpha");
... ... @@ -131,7 +129,7 @@ public class RedisMonitorHandleServiceImpl implements IRedisMonitorHandleService
ipList.add(key+":"+obj.getMoTypeId());
}
}
tMap.put(obj.getMoHostIp()+":"+obj.getMoTags(),ipList);
tMap.put(obj.getMoHostIp()+":"+ports[1],ipList);
redisMonitor.setIsFailed(1);
redisMonitor.setParamMonitor(paramMonitor.toString());
}
... ... @@ -141,7 +139,7 @@ public class RedisMonitorHandleServiceImpl implements IRedisMonitorHandleService
redisMonitor.setParamMonitor("0,");
}
redisMonitor.setNodeFrom(redisTweproxyMap.get(obj.getMoTypeId()));
redisMonitor.setNodeTo(obj.getMoHostIp()+":"+obj.getMoTags());
redisMonitor.setNodeTo(obj.getMoHostIp()+":"+ports[1]);
redisMonitor.setLevel(1);
redisMonitor.setRedisType(obj.getMoTypeId());
redisInfoList.add(redisMonitor);
... ... @@ -172,16 +170,22 @@ public class RedisMonitorHandleServiceImpl implements IRedisMonitorHandleService
paramMonitor.append("0,");
}else{
isFailed=1;
paramMonitor.append("1,");
String role=(String)result.get("role");
paramMonitor.append(role+",");
try {
BigDecimal maxmemory=BigDecimal.valueOf(Long.valueOf(result.get("maxmemory").toString()));
BigDecimal byteDang=BigDecimal.valueOf(Long.valueOf(1024*1024));
BigDecimal maxMemoryMb = maxmemory.divide(byteDang,2,4);
paramMonitor.append(maxMemoryMb+"M,");
BigDecimal used_memory=BigDecimal.valueOf(Long.valueOf(result.get("used_memory").toString()));
BigDecimal useProportion = used_memory.divide(maxmemory,2,4);
paramMonitor.append(useProportion+"%,");
long maxmemory=RedisCommonUtil.getRedisMaxMemory(ipConfig[0], Integer.valueOf(ipConfig[1]));
if(maxmemory==0){
paramMonitor.append("最大内存为0");
}else{
BigDecimal byteDang=BigDecimal.valueOf(Long.valueOf(1024*1024));
BigDecimal maxMemoryMb = BigDecimal.valueOf(maxmemory).divide(byteDang,2,4);
paramMonitor.append(maxMemoryMb+"M,");
BigDecimal used_memory=BigDecimal.valueOf(Long.valueOf(result.get("used_memory").toString()));
BigDecimal useProportion = used_memory.divide(BigDecimal.valueOf(maxmemory),2,4);
paramMonitor.append(useProportion.multiply(new BigDecimal(100))+"%,");
}
}catch (Exception e){
log.error("计算Redis使用率错误",e);
paramMonitor.append("0.00%,");
... ...
... ... @@ -13,7 +13,7 @@ public class RedisMonitorTask {
private IRedisMonitorHandleService redisMonitorService;
//@Scheduled(fixedRate=20000)
@Scheduled(cron="0 0/5 * * * ? ")
@Scheduled(cron="0 0/3 * * * ? ")
public void redisMonitor(){
redisMonitorService.redisMonitor();
}
... ...
... ... @@ -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...");
}
... ...
package com.monitor.model.request;
import lombok.Data;
import org.apache.commons.lang.StringUtils;
/**
* Created by yoho on 2016/6/20.
... ... @@ -9,7 +10,7 @@ import lombok.Data;
public class MObjectHostInfoReq {
String selectIp;
String selectGroup;
String selectGroup = StringUtils.EMPTY;
int isGroup = 0;
}
... ...
... ... @@ -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());
}
}
... ...