This commit is contained in:
@@ -271,7 +271,7 @@ public interface MonitoringContext {
|
||||
public static final String RMS_PASSWORD_FAIL_COUNT = "rms.password.fail.count";
|
||||
|
||||
// API 상태변화 스윙챗 발송여부
|
||||
public static final String DJB_UMS_MESSENGER_APISTATUS_ENABLED = "djb.ums.messenger.apistatus.enabled";
|
||||
public static final String DJB_UMS_MESSENGER_APIMONITOR_ENABLED = "djb.ums.messenger.api-monitor.enabled";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public class ApiStatusService {
|
||||
List<String> apiIds = entry.getValue();
|
||||
|
||||
//내부직원 스윙챗 발송
|
||||
if (monitoringContext.getBooleanProperty(MonitoringContext.DJB_UMS_MESSENGER_APISTATUS_ENABLED, true)) {
|
||||
if (monitoringContext.getBooleanProperty(MonitoringContext.DJB_UMS_MESSENGER_APIMONITOR_ENABLED, true)) {
|
||||
HashMap<String, Object> params = getSwingChatMessage(event, apiIds);
|
||||
ums.send("api-monitor", MessageCode.API_STATUS_CHANGED, params);
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.apim.portal.template.entity.MessageCode;
|
||||
import com.eactive.eai.rms.common.context.MonitoringContext;
|
||||
import com.eactive.eai.rms.data.entity.onl.djb.inflow.InflowTokenInsufficient;
|
||||
import com.eactive.eai.rms.ext.djb.ums.UmsManager;
|
||||
|
||||
@@ -23,6 +24,9 @@ public class InflowTokenService {
|
||||
@Autowired
|
||||
private InflowTokenRepository inflowTokenRepository;
|
||||
|
||||
@Autowired
|
||||
private MonitoringContext monitoringContext;
|
||||
|
||||
@Autowired
|
||||
private UmsManager ums;
|
||||
|
||||
@@ -32,9 +36,12 @@ public class InflowTokenService {
|
||||
for (InflowTokenInsufficient info : rows) {
|
||||
log.debug("유량제어 토큰 획득 실패: {}-{} 최근 {}분 동안 {}건", info.getEaisvcname(), info.getEaisvcdesc(), rangeMinute, info.getCnt());
|
||||
String message = "유량제어 토큰 획득 실패가 발생하였습니다 \n" + info.getEaisvcname();
|
||||
HashMap<String,Object> params = new HashMap<String,Object>();
|
||||
params.put("message", message);
|
||||
ums.send("api-monitor", MessageCode.INFLOW_TOKEN_FAILED, params);
|
||||
|
||||
if (monitoringContext.getBooleanProperty(MonitoringContext.DJB_UMS_MESSENGER_APIMONITOR_ENABLED, true)) {
|
||||
HashMap<String,Object> params = new HashMap<String,Object>();
|
||||
params.put("message", message);
|
||||
ums.send("api-monitor", MessageCode.INFLOW_TOKEN_FAILED, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user