In a first step you could try to redirect the output of your nodes in a specific file:
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 !