How to Enable io.druid.server.metrics.QueryCountStatsMonitor metric for Middle Manager

Hi Experts,

I am using Druid 0.10.1 and trying to enable io.druid.server.metrics.QueryCountStatsMonitor metric for middle manager nodes. This works fine for historical and broker nodes but middle manager is shutting down with below error.

Would appreciate any help here.

2018-06-04T15:46:21,926 INFO [main] io.druid.server.metrics.MetricsModule - Adding monitor[com.metamx.metrics.JvmMonitor@557a84fe]

Exception in thread “main” com.google.inject.CreationException: Unable to create injector, see the following errors:

  1. No implementation for io.druid.server.metrics.QueryCountStatsProvider was bound.

while locating io.druid.server.metrics.QueryCountStatsProvider

for the 1st parameter of io.druid.server.metrics.QueryCountStatsMonitor.<init>(QueryCountStatsMonitor.java:39)

while locating io.druid.server.metrics.QueryCountStatsMonitor

at io.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:90) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.druid.server.metrics.MetricsModule)

at io.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:90) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.druid.server.metrics.MetricsModule)

while locating com.metamx.metrics.MonitorScheduler

at io.druid.server.metrics.MetricsModule.configure(MetricsModule.java:75) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.druid.server.metrics.MetricsModule)

while locating com.metamx.metrics.MonitorScheduler annotated with @com.google.inject.name.Named(value=ForTheEagerness)

1 error

    at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)

    at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)

    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)

    at com.google.inject.Guice.createInjector(Guice.java:99)

    at com.google.inject.Guice.createInjector(Guice.java:73)

    at com.google.inject.Guice.createInjector(Guice.java:62)

    at io.druid.initialization.Initialization.makeInjectorWithModules(Initialization.java:386)

    at io.druid.cli.GuiceRunnable.makeInjector(GuiceRunnable.java:63)

    at io.druid.cli.ServerRunnable.run(ServerRunnable.java:40)

    at io.druid.cli.Main.main(Main.java:108)

Same issue for me. Any update

Can you check if you have added io.druid.server.metrics.QueryCountStatsMonitor to the list druid.monitoring.monitors in common.runtime.properties ?

Thanks,
Sashi

I am facing the same issue with Druid 15. Please let me know if you could resolve it.

Hi,
The druid base package has changed and is now org.apache instead of Io.

You should add org.apache.druid.server.metrics.QueryCountStatsMonitor

what about this one?
org.apache.druid.java.util.metrics.JvmMonitor is it right?
I’m using druid 0.14 and is not sending Java metrics to graphite.

The package for JvmMonitor doesn’t seem to have changed.****See https://github.com/apache/incubator-druid/blob/0.14.0-incubating/core/src/main/java/org/apache/druid/java/util/metrics/JvmMonitor.java.