String graphitePrefix = properties.getProperty(METRICCATCHER_GRAPHITE_PREFIX);
if (graphitePrefix == null) {
graphitePrefix = InetAddress.getLocalHost().getHostName();
}
logger.info("Creating Graphite reporter pointed at " + graphiteHost + ":" + graphitePort + " with prefix '" + graphitePrefix + "'");
GraphiteReporter graphiteReporter = new GraphiteReporter(graphiteHost, Integer.parseInt(graphitePort), StringUtils.trimToNull(graphitePrefix));
graphiteReporter.printVMMetrics = !disableJvmMetrics;
graphiteReporter.start(reportingInterval, TimeUnit.SECONDS);
}
int maxMetrics = Integer.parseInt(properties.getProperty(METRICCATCHER_MAX_METRICS, "500"));
logger.info("Max metrics: " + maxMetrics);
Map<String, Metric> lruMap = new LRUMap<String, Metric>(10, maxMetrics);