Druid Metric Monitors

Druid has quite a few Metric Monitors available (Configuration reference · Apache Druid).

Is there a list of which monitors should be used for which process?

For Example: If we add org.apache.druid.server.metrics.TaskCountStatsMonitor to the common.runtime.properties file on MiddleManager Service Nodes, the service does not start. It fails, with the following error:

Exception in thread "main" java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors:

1) No implementation for org.apache.druid.server.metrics.TaskCountStatsProvider was bound.
  while locating org.apache.druid.server.metrics.TaskCountStatsProvider
    for the 1st parameter of org.apache.druid.server.metrics.TaskCountStatsMonitor.<init>(TaskCountStatsMonitor.java:37)
  while locating org.apache.druid.server.metrics.TaskCountStatsMonitor
  at org.apache.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:99) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.server.metrics.MetricsModule)
  at org.apache.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:99) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.server.metrics.MetricsModule)
  while locating org.apache.druid.java.util.metrics.MonitorScheduler
  at org.apache.druid.server.metrics.MetricsModule.configure(MetricsModule.java:84) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.server.metrics.MetricsModule)
  while locating org.apache.druid.java.util.metrics.MonitorScheduler annotated with @com.google.inject.name.Named(value=ForTheEagerness)

1 error
        at org.apache.druid.cli.GuiceRunnable.makeInjector(GuiceRunnable.java:72)
        at org.apache.druid.cli.ServerRunnable.run(ServerRunnable.java:62)
        at org.apache.druid.cli.Main.main(Main.java:113)

There isn’t anything documented yet.

Hey @krishnat – also see

This is exactly, what i was looking for. Thanks!!

Does “druid.monitoring.monitors” property, need to be listed in common.runtime.properties. Or can we include it as part of the processes’s runtime.properties ?

Yep - it works in both. (When I was doing my crazy table I just put it in the runtime.properties :slight_smile: )