public int addMonitoredServer(ServerDO server) throws BAMException {
int addingServerStatus = -1;
BAMConfigurationDSClient bamConfigurationDSClient = BAMUtil.getBAMConfigurationDSClient();
int tenantId;
if (server.getTenantID() == NO_TENANT_MODE) {
BAMTenantAdmin bamTenantAdmin = new BAMTenantAdmin();
tenantId = bamTenantAdmin.getTenantId();
} else {
tenantId = server.getTenantID();
}
String serverUrl = server.getServerURL();