Configuring query metrics logging


I tried to read Druid documentation about metric logging, bit got utterly confused. Is there some example (preferably for Imply, but Druid is Ok too) how to direct all query metrics both on broker and historical nodes to a separate file?

Thanks in advance,


Hello Nikita,

In a first step you could try to redirect the output of your nodes in a specific file:

sudo java cat conf/druid/historical/jvm.config | xargs -cp conf/druid/_common:conf/druid/historical:lib/* io.druid.cli.Main server historical > /home/ec2-user/LogsDruid/HistoMetrics 2> /home/ec2-user/LogsDruid/HistoStderr &

And then just try to cat/grep the log file. Something like this maybe:

sudo cat /home/ec2-user/LogsDruid/HistoMetrics | grep myqueryid | grep query/time

And then you can try to look at statsd-emitter, which is a contrib extension of druid !

I hope it will help, do not hesitate if you need more answers !


com.metamx.emitter.core.LoggingEmitter exists but the docs might not be clear on how to enable it. It might not actually have the correct wirings by default. If this is important to you would you mind filing an issue? Such a thing would be a great starter extension for someone just getting into druid.