kafka-statsd-metrics2
kafka-statsd-metrics2 copied to clipboard
Doesn't seem to work with 0.10.1.0
I have successfully been running this for a long time but during my last upgrade to 10.1.0 it seems to have stopped working - I'm no longer getting any correct stats sent to my statsd server, is there an incompatibility or is theconfiguration different?
Before you upgrade, which Kafka version did you run?
I was running 10.0.0 and it was working, I actually messed with the settings a bit and it started working this morning, not sure exactly what it was that I did that made it work though.
to get this working for 0.10.1.0 the only change I needed to make was to re-compile the shadow jar with the kafka 0.10.1.0 dependency rather than the older version listed in build.gradle.
No other config changes necessary for simple connection with statsd.
Hi there. I am trying to use statsd-metrics2 with latest kafka build (kafka_2.11-0.10.1.1.tgz). Got following after service restart:
org.apache.kafka.common.KafkaException: com.airbnb.kafka.StatsdMetricsReporter ClassNotFoundException exception occured
My config is pretty simple:
metric.reporters=com.airbnb.kafka.StatsdMetricsReporter
external.kafka.statsd.reporter.enabled=true
external.kafka.statsd.host=some.remote.host
external.kafka.statsd.port=8125
#external.kafka.statsd.tag.enabled=true
external.kafka.statsd.metrics.prefix=kafka_test
Tried to build statsd-metrics2 from source, also tried to set proper kafka verison in build.gradle, but still no effect.
Ok. finally server started well with locally compiled jar and with old reporter
# declare the reporter if old producer/consumer is used
kafka.metrics.reporters=com.airbnb.kafka.kafka08.StatsdMetricsReporter
but there are no any counters in statsd and no string "Kafka Statsd metrics reporter is enabled" in server log.
Changing the dependency line on build.gradle to
compile 'org.apache.kafka:kafka_2.11:0.10.1.0'
And using
kafka.metrics.reporters=com.airbnb.kafka.kafka08.StatsdMetricsReporter
in server.properties seems to have worked for our 0.10.1.0 instance of kafka, however I do see lots and lots of errors on the statsd log.
Using kafka-statsd-metrics2 0.52 or 0.53 and kafka 0.10.1.0, I was getting an org.apache.kafka.common.KafkaException: com.airbnb.kafka.StatsdMetricsReporter ClassNotFoundException exception occured
message. I resolved it as follows:
-
Instead of using
metric.reporters=com.airbnb.kafka.StatsdMetricsReporter
as suggested in the README, I usedmetric.reporters=com.airbnb.kafka.kafka09.StatsdMetricsReporter
. When I looked at the .jar contents, there is no such class as com.airbnb.kafka.StatsdMetricsReporter! You must use eitherkafka08
orkafka09
. -
There is a dependency on the
com.timgroup.statsd
library, but no such library is included in the shadow jar. I downloaded thecom.indeed:java-dogstatsd-client:2.0.11
statsd client I saw mentioned in the gradle file and verified that it included thecom.timgroup.statsd
classes I needed. I copied thisjava-dogstatsd-client-2.5.jar
file into my classpath.
After restarting the kafka service I saw metrics appearing in statsd. I didn't see any errors appearing in the statsd or kafka logs.