Search in sources :

Example 1 with IndyZabbixReporter

use of org.commonjava.indy.metrics.zabbix.reporter.IndyZabbixReporter 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);
}
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)

Example 2 with IndyZabbixReporter

use of org.commonjava.indy.metrics.zabbix.reporter.IndyZabbixReporter 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);
}
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)

Example 3 with IndyZabbixReporter

use of org.commonjava.indy.metrics.zabbix.reporter.IndyZabbixReporter 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)3 MetricRegistry (com.codahale.metrics.MetricRegistry)3 Graphite (com.codahale.metrics.graphite.Graphite)3 GraphiteReporter (com.codahale.metrics.graphite.GraphiteReporter)3 InetSocketAddress (java.net.InetSocketAddress)3 TimeUnit (java.util.concurrent.TimeUnit)3 ApplicationScoped (javax.enterprise.context.ApplicationScoped)3 Inject (javax.inject.Inject)3 IndyMetricsConfig (org.commonjava.indy.metrics.conf.IndyMetricsConfig)3 IndyMetricsNamed (org.commonjava.indy.metrics.conf.annotation.IndyMetricsNamed)3 ZabbixCacheStorage (org.commonjava.indy.metrics.zabbix.cache.ZabbixCacheStorage)3 IndyZabbixReporter (org.commonjava.indy.metrics.zabbix.reporter.IndyZabbixReporter)3 IndyZabbixSender (org.commonjava.indy.metrics.zabbix.sender.IndyZabbixSender)3 IndyHttpProvider (org.commonjava.indy.subsys.http.IndyHttpProvider)3