Search in sources :

Example 1 with Monitor

use of com.metamx.metrics.Monitor in project druid by druid-io.

the class MetricsModule method getMonitorScheduler.

@Provides
@ManageLifecycle
public MonitorScheduler getMonitorScheduler(Supplier<DruidMonitorSchedulerConfig> config, MonitorsConfig monitorsConfig, Set<Class<? extends Monitor>> monitorSet, ServiceEmitter emitter, Injector injector) {
    List<Monitor> monitors = Lists.newArrayList();
    for (Class<? extends Monitor> monitorClass : Iterables.concat(monitorsConfig.getMonitors(), monitorSet)) {
        final Monitor monitor = injector.getInstance(monitorClass);
        log.info("Adding monitor[%s]", monitor);
        monitors.add(monitor);
    }
    return new MonitorScheduler(config.get(), Execs.scheduledSingleThreaded("MonitorScheduler-%s"), emitter, monitors);
}
Also used : ExecutorServiceMonitor(io.druid.query.ExecutorServiceMonitor) Monitor(com.metamx.metrics.Monitor) JvmCpuMonitor(com.metamx.metrics.JvmCpuMonitor) JvmMonitor(com.metamx.metrics.JvmMonitor) SysMonitor(com.metamx.metrics.SysMonitor) MonitorScheduler(com.metamx.metrics.MonitorScheduler) ManageLifecycle(io.druid.guice.ManageLifecycle) Provides(com.google.inject.Provides)

Aggregations

Provides (com.google.inject.Provides)1 JvmCpuMonitor (com.metamx.metrics.JvmCpuMonitor)1 JvmMonitor (com.metamx.metrics.JvmMonitor)1 Monitor (com.metamx.metrics.Monitor)1 MonitorScheduler (com.metamx.metrics.MonitorScheduler)1 SysMonitor (com.metamx.metrics.SysMonitor)1 ManageLifecycle (io.druid.guice.ManageLifecycle)1 ExecutorServiceMonitor (io.druid.query.ExecutorServiceMonitor)1