AutoscalerContext asCtx = AutoscalerContext.getInstance();
AbstractMonitor monitor;
if(asCtx.monitorExist(clusterId)){
monitor = asCtx.getMonitor(clusterId);
}else if(asCtx.lbMonitorExist(clusterId)){
monitor = asCtx.getLBMonitor(clusterId);
}else{
if(log.isDebugEnabled()){
log.debug(String.format("A cluster monitor is not found in autoscaler context [cluster] %s", clusterId));
}