Authored by FengRuwei

短信告警开关条件

... ... @@ -36,8 +36,10 @@ public class MsgJavaApiHandler implements IJavaApiHadnler {
@Override
public void handler(JavaApiStatics javaApiStatics) {
String key = buildKey(javaApiStatics);
//无错
if (javaApiStatics.isHasException() == false) {
//开关关闭、告警次数未设置、无错
if (javaApiStatics.getJavaApiInfo().getApiToggle() == 0 ||
javaApiStatics.getJavaApiInfo().getApiWarnTrigger() <= 0 ||
javaApiStatics.isHasException() == false) {
if (mapStatics.containsKey(key)) {
mapStatics.remove(key);
}
... ... @@ -76,10 +78,9 @@ public class MsgJavaApiHandler implements IJavaApiHadnler {
msgBuilder.append("Java API Error ")
.append("最近出错次数:" + num).append(" , ")
.append("NAME:" + javaApiInfo.getApiName()).append(" , ")
.append("URL:" + javaApiInfo.getApiUrl()).append(" , ")
// .append("URL:" + javaApiInfo.getApiUrl()).append(" , ")
.append("IP:" + mObjectInfo.getMoHostIp()).append(" , ")
.append("TYPE:" + javaApiInfo.getServiceType()).append(" , ")
.append(".");
.append("TYPE:" + javaApiInfo.getServiceType()).append(" , ");
return msgBuilder.toString();
}
... ...
... ... @@ -46,7 +46,7 @@ sendsms.alarm.mobile.logs.sns_send_failed=15905144483,18751986615,18652008443,18
#-----------------------------Logs告警模块--------------------------
#-----------------------------监控系统开发人员--------------------------
sendsms.alarm.mobile.ops_manager.developer=13914772123,15150551036
sendsms.alarm.mobile.ops_manager.developer=13914772123
#-----------------------------监控系统开发人员--------------------------
dnspod.mobile=15905144483,18652008443,18751986615
... ...
... ... @@ -46,7 +46,7 @@ sendsms.alarm.mobile.logs.sns_send_failed=15905144483,18751986615,18652008443,18
#-----------------------------Logs告警模块--------------------------
#-----------------------------监控系统开发人员--------------------------
sendsms.alarm.mobile.ops_manager.developer=13914772123,15150551036
sendsms.alarm.mobile.ops_manager.developer=13914772123
#-----------------------------监控系统开发人员--------------------------
dnspod.mobile=15905144483,18652008443,18751986615
... ...