public static ThresholdingVisitor create(int nodeId, String hostAddress, String serviceName, RrdRepository repo, ServiceParameters svcParams, ResourceStorageDao resourceStorageDao) throws ThresholdInitializationException {
String enabled = ParameterMap.getKeyedString(svcParams.getParameters(), "thresholding-enabled", null);
if (enabled != null && !"true".equals(enabled)) {
LOG.info("create: Thresholds processing is not enabled. Check thresholding-enabled param on collectd package");
return null;
}
CollectorThresholdingSet thresholdingSet = new CollectorThresholdingSet(nodeId, hostAddress, serviceName, repo, svcParams, resourceStorageDao);
if (!thresholdingSet.hasThresholds()) {
LOG.warn("create: the ipaddress/service {}/{} on node {} has no configured thresholds.", hostAddress, serviceName, nodeId);
}
return new ThresholdingVisitor(thresholdingSet);
}