class ThresholdMonitoringReporter extends ScheduledMetrics2Reporter {

	private void checkMetrics(Map<String, Map<MetricName, Metric>> metricsGroupedByName, Check check) {
		List<CheckResult> checkResults = new LinkedList<CheckResult>();

		Map<MetricName, Metric> metricsOfName = metricsGroupedByName.get(check.getTarget().getName());
		if (metricsOfName == null) {
			metricsOfName = Collections.emptyMap();
		}
		for (Map.Entry<MetricName, Metric> entry : metricsOfName.entrySet()) {
			if (entry.getKey().matches(check.getTarget())) {
				try {
					checkResults.addAll(check.check(entry.getKey(), asMap(entry.getValue())));
				} catch (RuntimeException e) {
					logger.warn(e.getMessage(), e);
				}
			}
		}
		try {
			addIncident(check, checkResults);
		} catch (RuntimeException e) {
			logger.warn(e.getMessage(), e);
		}
	}

	public  ThresholdMonitoringReporter(ThresholdMonitoringReporterBuilder builder);

}