airbnb / kafka-statsd-metrics2

Send Kafka Metrics to StatsD.
Apache License 2.0
135 stars 50 forks source link

Doesn't seem to work with 0.10.1.0 #19

Open dtboctor opened 7 years ago

dtboctor commented 7 years ago

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?

jun-he commented 7 years ago

Before you upgrade, which Kafka version did you run?

dtboctor commented 7 years ago

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.

evbo commented 7 years ago

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.

samriang commented 7 years ago

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 commented 7 years ago

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.

seancdugan commented 7 years ago

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.

jasonrosendale commented 6 years ago

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.