Druid metrics StatsD emitter

I have Druid 0.9.2 installed (as a part of imply 2.0.0). I want to send Druid metrics to Datadog. Datadog has a StatsD agent and hence I configured the druid statsd emitter as follows:

  1. I installed the statsd extension via pull-deps

java \

-cp “lib/*” \

-Ddruid.extensions.directory=“extensions” \

-Ddruid.extensions.hadoopDependenciesDir=“hadoop-dependencies” \

io.druid.cli.Main tools pull-deps \

–no-default-hadoop \

-c "io.druid.extensions.contrib:statsd-emitter:0.9.2”

  1. I added the following lines to common.runtime.properties

druid.extensions.loadList=[“druid-s3-extensions”,“postgresql-metadata-storage”,“druid-kafka-indexing-service”,“statsd-emitter”]

druid.monitoring.emissionPeriod=PT1m

druid.monitoring.monitors=[“com.metamx.metrics.JvmMonitor”,“com.metamx.metrics.SysMonitor”,“io.druid.client.cache.CacheMonitor”,“io.druid.server.metrics.EventReceiverFirehoseMonitor”]

druid.emitter=“statsd”

druid.emitter.statsd.hostname=localhost

druid.emitter.statsd.port=8125

druid.emitter.statsd.prefix=druid.metric

druid.emitter.statsd.includeHost=true

  1. I get the following error when I try to start coordinator and overlord.

2017-03-28T16:20:40,098 INFO [main] io.druid.initialization.Initialization - Loading extension [statsd-emitter] for class [io.druid.initialization.DruidModule]

2017-03-28T16:20:40,099 INFO [main] io.druid.initialization.Initialization - Adding local file system extension module [io.druid.emitter.statsd.StatsDEmitterModule] for class [io.druid.initialization.DruidModule]

2017-03-28T16:20:42,111 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.server.metrics.DruidMonitorSchedulerConfig] from props[druid.monitoring.] as [io.druid.server.metrics.DruidMonitorSchedulerConfig@3766c667]

2017-03-28T16:20:42,137 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.server.metrics.MonitorsConfig] from props[druid.monitoring.] as [MonitorsConfig{monitors=[class com.metamx.metrics.SysMonitor, class io.druid.client.cache.CacheMonitor, class io.druid.server.metrics.EventReceiverFirehoseMonitor]}]

2017-03-28T16:20:42,209 INFO [main] io.druid.guice.JsonConfigurator - Loaded class[class io.druid.server.DruidNode] from props[druid.] as [DruidNode{serviceName=‘druid/coordinator’, host=‘ip-10-101-2-88.ec2.internal’, port=8081}]

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

1) Error in custom provider, java.lang.NoClassDefFoundError: org/hyperic/jni/ArchNotSupportedException

at io.druid.server.metrics.MetricsModule.getSysMonitor(MetricsModule.java:138) (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.getSysMonitor(MetricsModule.java:138) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> io.druid.server.metrics.MetricsModule)

while locating com.metamx.metrics.SysMonitor

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:366)

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

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

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

Caused by: java.lang.NoClassDefFoundError: org/hyperic/jni/ArchNotSupportedException

at com.metamx.metrics.SysMonitor.(SysMonitor.java:49)

at io.druid.server.metrics.MetricsModule.getSysMonitor(MetricsModule.java:138)

at io.druid.server.metrics.MetricsModule$$FastClassByGuice$$9b6589cd.invoke()

at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:264)

at com.google.inject.internal.ProviderMethod$Factory.provision(ProviderMethod.java:401)

at com.google.inject.internal.ProviderMethod$Factory.get(ProviderMethod.java:376)

at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)

at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)

at io.druid.guice.LifecycleScope$1.get(LifecycleScope.java:68)

at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)

at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1019)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)

at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1015)

at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1054)

at io.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:93)

at io.druid.server.metrics.MetricsModule$$FastClassByGuice$$9b6589cd.invoke()

at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:264)

at com.google.inject.internal.ProviderMethod$Factory.provision(ProviderMethod.java:401)

at com.google.inject.internal.ProviderMethod$Factory.get(ProviderMethod.java:376)

at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)

at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)

at io.druid.guice.LifecycleScope$1.get(LifecycleScope.java:68)

at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)

at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)

at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)

at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)

at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:194)

at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)

at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)

at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)

at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1085)

at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)

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

… 8 more

Caused by: java.lang.ClassNotFoundException: org.hyperic.jni.ArchNotSupportedException

at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

… 44 more

SO, this looks like a Sigar lib error. I was wondering whether this cropped up because of some conflicting versions. Has anybody ever came across such an error?

Any help would be greatly appreciated.

Thanks

Aniket,

If this errors were caused by Sigar lib, you may remove “com.metamx.metrics.SysMonitor” from druid.monitoring.monitors, then try again, see if you would get the errors.

Because “com.metamx.metrics.SysMonitor”

‘’’

uses the SIGAR library to report on various system activities and statuses. Make sure to add the sigar library jar to your classpath if using this monitor.

‘’’

in addition: hope this link helps: https://groups.google.com/forum/#!topic/druid-user/g_YIvJkjdw8

I came across similar errors. looking forward to your update.

– Qijing