airbnb / kafka-statsd-metrics2

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

statsd unable to parse metrics #30

Open peetasan opened 6 years ago

peetasan commented 6 years ago

Using kafka_2.11-0.11.0.2, collectd 5.8.0.116.gcd59bf0-1~xenial with <Plugin "statsd"> I have the following errors in my collectd.log:


[2018-06-22 13:40:55] statsd plugin: Unable to parse line: "kafka.server.FetcherStats.RequestsPerSec.1MinuteRate:1.994529|g"
[2018-06-22 13:40:55] statsd plugin: Unable to parse line: "kafka.server.ReplicaFetcherManager.MaxLag:0|g|#clientId:Replica"
[2018-06-22 13:40:55] statsd plugin: Unable to parse line: "kafka.server.ReplicaFetcherManager.MinFetchRate:1.984874|g|#cli"

It seems that the messages to be sent to statsd are truncated somehow, because they look to be the same length (at least in the error message). 
yousafsyed-bg commented 4 years ago

I am facing the exact same problem, did you fix the problem ?

YoavNordmann commented 2 years ago

Hi I am facing the exact same problem. Did anyone ever fix this issue ?

YoavNordmann commented 2 years ago

I found the solution. I was using telegraf with the statsd input plugin, which is what emitted those errors. The problem is that there are 2 statsd formats: etsy and datadog. This is especially important for the way multiple tags are sent, more specifically, with which separator between tags. This exporter emits in the datadog format while the telegraf statsd plugin is working with the etsy standard. All I needed to do what let the telegraf statsd plugin know that there is some data in the datadog format and voila, it works. Enjoy!