kafka-statsd-metrics2 icon indicating copy to clipboard operation
kafka-statsd-metrics2 copied to clipboard

Doesn't seem to work with 0.10.1.0

Open dtboctor opened this issue 8 years ago • 7 comments

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?

dtboctor avatar Jan 06 '17 23:01 dtboctor

Before you upgrade, which Kafka version did you run?

jun-he avatar Jan 10 '17 05:01 jun-he

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.

dtboctor avatar Jan 10 '17 20:01 dtboctor

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.

evbo avatar Jan 27 '17 22:01 evbo

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.

samriang avatar Feb 07 '17 16:02 samriang

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.

samriang avatar Feb 07 '17 16:02 samriang

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.

seancdugan avatar Mar 24 '17 14:03 seancdugan

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:

  1. Instead of using metric.reporters=com.airbnb.kafka.StatsdMetricsReporter as suggested in the README, I used metric.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 either kafka08 or kafka09.

  2. There is a dependency on the com.timgroup.statsd library, but no such library is included in the shadow jar. I downloaded the com.indeed:java-dogstatsd-client:2.0.11 statsd client I saw mentioned in the gradle file and verified that it included the com.timgroup.statsd classes I needed. I copied this java-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.

jasonrosendale avatar Jun 26 '18 16:06 jasonrosendale