prometheus-kafka-consumer-group-exporter
prometheus-kafka-consumer-group-exporter copied to clipboard
Getting panic: runtime error: index out of range Error when using any versions above 0.0.1
I have used this exporter for checking the consumer lag and realized that the lag information was not accurate reported in 0.0.1. I noticed the issue was already opened https://github.com/kawamuray/prometheus-kafka-consumer-group-exporter/issues/6 and wanted to wait for this release. Now that this is fixed, I wanted to try out the latest version and i dont seem to get it working.
My Kafka version is kafka_2.11-0.10.0.1
`panic: runtime error: index out of range
goroutine 50 [running]: github.com/kawamuray/prometheus-kafka-consumer-group-exporter/kafka.(*regexpParser).parseLine(0xc4200fa620, 0xc4203060b3, 0x8d, 0xc420188b40, 0x0, 0x0) /home/travis/gopath/src/github.com/kawamuray/prometheus-kafka-consumer-group-exporter/kafka/parsing.go:134 +0x8e2 github.com/kawamuray/prometheus-kafka-consumer-group-exporter/kafka.(*regexpParser).Parse(0xc4200fa620, 0xc420306000, 0x629, 0x0, 0x0, 0xc420306000, 0x0, 0x0, 0x8bb8dc, 0xe) /home/travis/gopath/src/github.com/kawamuray/prometheus-kafka-consumer-group-exporter/kafka/parsing.go:74 +0x1cf github.com/kawamuray/prometheus-kafka-consumer-group-exporter/kafka.(*DelegatingParser).Parse(0xc4200fba80, 0xc420306000, 0x629, 0x0, 0x0, 0x3, 0xc420306000, 0x629, 0x0, 0x0) /home/travis/gopath/src/github.com/kawamuray/prometheus-kafka-consumer-group-exporter/kafka/parsing.go:211 +0xa8 github.com/kawamuray/prometheus-kafka-consumer-group-exporter/kafka.(*ConsumerGroupsCommandClient).DescribeGroup(0xc420156f00, 0xb12ce0, 0xc42024a120, 0xc4201cf31e, 0x34, 0x0, 0x0, 0x0, 0x0, 0x0) /home/travis/gopath/src/github.com/kawamuray/prometheus-kafka-consumer-group-exporter/kafka/collector.go:79 +0x149 github.com/kawamuray/prometheus-kafka-consumer-group-exporter/sync.(*FanInConsumerGroupInfoClient).describeLoop.func1(0xc42000ec80, 0xc4201cf31e, 0x34, 0xc4201a42a0, 0xb12ce0, 0xc42024a120, 0xc42001a4e0) /home/travis/gopath/src/github.com/kawamuray/prometheus-kafka-consumer-group-exporter/sync/metrics.go:159 +0x71 created by github.com/kawamuray/prometheus-kafka-consumer-group-exporter/sync.(*FanInConsumerGroupInfoClient).describeLoop /home/travis/gopath/src/github.com/kawamuray/prometheus-kafka-consumer-group-exporter/sync/metrics.go:158 +0x5aa`
Could you check and see why i am seeing this issue.
Hi! Would it be possible for you to share the output of kafka-consumer-groups.sh
describe groups?
...and if you have the time, feel free to write a test in https://github.com/kawamuray/prometheus-kafka-consumer-group-exporter/blob/master/kafka/parsing_test.go and submitting the start of a pull request.
@JensRantil I think the issue is because of the unknown lag and unknown offset that i am getting for some of my consumer group
WARN[0026] unable to find current offset field. line: logos, adapter-out-topic, 1, unknown, 225123, unknown, consumer-1_/10.20.3.11 source="parsing.go:110" WARN[0026] unable to parse int for lag. line: %slogos, topic1, 1, unknown, 225123, unknown, consumer-1_/10.20.3.11 source="parsing.go:118" WARN[0026] unable to find current offset field. Line: logos, topic1, 1, unknown, 225123, unknown, consumer-1_/10.20.3.11 source="parsing.go:125" WARN[0026] unable to parse int for current offset. Line: %slogos, topic1, 1, unknown, 225123, unknown, consumer-1_/10.20.3.11 source="parsing.go:130"
Ah, could it be related to https://github.com/kawamuray/prometheus-kafka-consumer-group-exporter/issues/49?
@JensRantil Yes. That looks similar.