use of org.commonjava.indy.metrics.conf.IndyMetricsConfig in project indy by Commonjava.
the class ReporterIntializer method initGraphiteReporterForHealthCheckMetric.
private void initGraphiteReporterForHealthCheckMetric(MetricRegistry metrics, IndyMetricsConfig config) {
final Graphite graphite = new Graphite(new InetSocketAddress(config.getGrphiterHostName(), config.getGrphiterPort()));
final GraphiteReporter reporter = GraphiteReporter.forRegistry(metrics).prefixedWith(config.getGrphiterPrefix()).convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS).filter((name, metric) -> {
if (!name.contains(FILTER_SIMPLE) && name.contains(FILTER_HEALTHCHECK)) {
return true;
}
return false;
}).build(graphite);
reporter.start(config.getGrphiterHealthcheckPeriod(), TimeUnit.SECONDS);
}
use of org.commonjava.indy.metrics.conf.IndyMetricsConfig in project indy by Commonjava.
the class ReporterIntializer method initZabbixReporterForHealthCheckMetric.
private void initZabbixReporterForHealthCheckMetric(MetricRegistry metrics, IndyMetricsConfig config) {
IndyZabbixReporter reporter = initZabbixReporter(metrics, config).filter((name, metric) -> {
if (!name.contains(FILTER_SIMPLE) && name.contains(FILTER_HEALTHCHECK)) {
return true;
}
return false;
}).build(initZabbixSender());
reporter.start(config.getZabbixHealthcheckPeriod(), TimeUnit.SECONDS);
}
use of org.commonjava.indy.metrics.conf.IndyMetricsConfig in project indy by Commonjava.
the class ReporterIntializer method initGraphiteReporterForSimpleMetric.
private void initGraphiteReporterForSimpleMetric(MetricRegistry metrics, IndyMetricsConfig config) {
final Graphite graphite = new Graphite(new InetSocketAddress(config.getGrphiterHostName(), config.getGrphiterPort()));
final GraphiteReporter reporter = GraphiteReporter.forRegistry(metrics).prefixedWith(config.getGrphiterPrefix()).convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS).filter((name, metric) -> {
if (name.contains(FILTER_SIMPLE)) {
return true;
}
return false;
}).build(graphite);
reporter.start(config.getGrphiterSimplePriod(), TimeUnit.SECONDS);
}
use of org.commonjava.indy.metrics.conf.IndyMetricsConfig in project indy by Commonjava.
the class ReporterIntializer method initZabbixReporterForSimpleMetric.
private void initZabbixReporterForSimpleMetric(MetricRegistry metrics, IndyMetricsConfig config) {
IndyZabbixReporter reporter = initZabbixReporter(metrics, config).filter((name, metric) -> {
if (name.contains(FILTER_SIMPLE)) {
return true;
}
return false;
}).build(initZabbixSender());
reporter.start(config.getZabbixSimplePriod(), TimeUnit.SECONDS);
}
use of org.commonjava.indy.metrics.conf.IndyMetricsConfig in project indy by Commonjava.
the class ReporterIntializer method initGraphiteReporterForJVMMetric.
private void initGraphiteReporterForJVMMetric(MetricRegistry metrics, IndyMetricsConfig config) {
final Graphite graphite = new Graphite(new InetSocketAddress(config.getGrphiterHostName(), config.getGrphiterPort()));
final GraphiteReporter reporter = GraphiteReporter.forRegistry(metrics).prefixedWith(config.getGrphiterPrefix()).convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS).filter((name, metric) -> {
if (!name.contains(FILTER_SIMPLE) && name.contains(FILTER_JVM)) {
return true;
}
return false;
}).build(graphite);
reporter.start(config.getGrphiterJVMPriod(), TimeUnit.SECONDS);
}
Aggregations