Search in sources :

Example 6 with IndyMetricsConfig

use of org.commonjava.indy.metrics.conf.IndyMetricsConfig in project indy by Commonjava.

the class ReporterIntializer method initZabbixReporterForJVMMetric.

private void initZabbixReporterForJVMMetric(MetricRegistry metrics, IndyMetricsConfig config) {
    IndyZabbixReporter reporter = initZabbixReporter(metrics, config).filter((name, metric) -> {
        if (!name.contains(FILTER_SIMPLE) && name.contains(FILTER_JVM)) {
            return true;
        }
        return false;
    }).build(initZabbixSender());
    reporter.start(config.getZabbixJVMPriod(), TimeUnit.SECONDS);
}
Also used : MetricRegistry(com.codahale.metrics.MetricRegistry) ZabbixCacheStorage(org.commonjava.indy.metrics.zabbix.cache.ZabbixCacheStorage) IndyMetricsConfig(org.commonjava.indy.metrics.conf.IndyMetricsConfig) IndyZabbixSender(org.commonjava.indy.metrics.zabbix.sender.IndyZabbixSender) Graphite(com.codahale.metrics.graphite.Graphite) InetSocketAddress(java.net.InetSocketAddress) IndyHttpProvider(org.commonjava.indy.subsys.http.IndyHttpProvider) Inject(javax.inject.Inject) TimeUnit(java.util.concurrent.TimeUnit) IndyZabbixReporter(org.commonjava.indy.metrics.zabbix.reporter.IndyZabbixReporter) IndyMetricsNamed(org.commonjava.indy.metrics.conf.annotation.IndyMetricsNamed) GraphiteReporter(com.codahale.metrics.graphite.GraphiteReporter) ConsoleReporter(com.codahale.metrics.ConsoleReporter) ApplicationScoped(javax.enterprise.context.ApplicationScoped) IndyZabbixReporter(org.commonjava.indy.metrics.zabbix.reporter.IndyZabbixReporter)

Aggregations

ConsoleReporter (com.codahale.metrics.ConsoleReporter)6 MetricRegistry (com.codahale.metrics.MetricRegistry)6 Graphite (com.codahale.metrics.graphite.Graphite)6 GraphiteReporter (com.codahale.metrics.graphite.GraphiteReporter)6 InetSocketAddress (java.net.InetSocketAddress)6 TimeUnit (java.util.concurrent.TimeUnit)6 ApplicationScoped (javax.enterprise.context.ApplicationScoped)6 Inject (javax.inject.Inject)6 IndyMetricsConfig (org.commonjava.indy.metrics.conf.IndyMetricsConfig)6 IndyMetricsNamed (org.commonjava.indy.metrics.conf.annotation.IndyMetricsNamed)6 ZabbixCacheStorage (org.commonjava.indy.metrics.zabbix.cache.ZabbixCacheStorage)6 IndyZabbixReporter (org.commonjava.indy.metrics.zabbix.reporter.IndyZabbixReporter)6 IndyZabbixSender (org.commonjava.indy.metrics.zabbix.sender.IndyZabbixSender)6 IndyHttpProvider (org.commonjava.indy.subsys.http.IndyHttpProvider)6