Config cfg = services.getService(Config.class, ServerEnvironment.DEFAULT_INSTANCE_NAME);
MonitoringLevel monitoringLevel = MonitoringLevel.OFF; // default per DTD
if (cfg.getMonitoringService() != null) {
ModuleMonitoringLevels levels =
cfg.getMonitoringService().getModuleMonitoringLevels();
if (levels != null) {
monitoringLevel = MonitoringLevel.instance(
levels.getHttpService());
}
}
if(MonitoringLevel.OFF.equals(monitoringLevel)) {
isMonitoringEnabled = false;