Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Burrow API v3 #9

Closed
wants to merge 3 commits into from
Closed

Conversation

solsson
Copy link

@solsson solsson commented Jan 17, 2018

Extremely quick shot at #8 to have something to scrape in Yolean/kubernetes-kafka#125.

The only useful value in :8080/metrics after the initial commit is kafka_burrow_topic_partition_offset.

@solsson
Copy link
Author

solsson commented Jan 17, 2018

63de275 was done only to speed up image pull for the pod. I can revert that if the PR ever gets close to mergeable state.

@solsson solsson mentioned this pull request Jan 19, 2018
solsson added a commit to Yolean/kubernetes-kafka that referenced this pull request Jan 19, 2018
@solsson
Copy link
Author

solsson commented Jan 19, 2018

With the fix above I get the following exports for a mini cluster:

# HELP kafka_burrow_partition_current_offset The latest offset commit on a partition as reported by burrow.
# TYPE kafka_burrow_partition_current_offset gauge
kafka_burrow_partition_current_offset{cluster="local",group="console-consumer-94138",partition="0",topic="test-produce-consume"} 54
# HELP kafka_burrow_partition_lag The lag of the latest offset commit on a partition as reported by burrow.
# TYPE kafka_burrow_partition_lag gauge
kafka_burrow_partition_lag{cluster="local",group="console-consumer-94138",partition="0",topic="test-produce-consume"} 0
# HELP kafka_burrow_partition_max_offset The log end offset on a partition as reported by burrow.
# TYPE kafka_burrow_partition_max_offset gauge
kafka_burrow_partition_max_offset{cluster="local",group="console-consumer-94138",partition="0",topic="test-produce-consume"} 0
# HELP kafka_burrow_topic_partition_offset The latest offset on a topic's partition as reported by burrow.
# TYPE kafka_burrow_topic_partition_offset gauge
kafka_burrow_topic_partition_offset{cluster="local",partition="0",topic="test-kafkacat"} 54
kafka_burrow_topic_partition_offset{cluster="local",partition="0",topic="test-produce-consume"} 54
kafka_burrow_topic_partition_offset{cluster="local",partition="6",topic="__consumer_offsets"} 110
# ... and so on
# HELP kafka_burrow_total_lag The total amount of lag for the consumer group as reported by burrow
# TYPE kafka_burrow_total_lag gauge
kafka_burrow_total_lag{cluster="local",group="console-consumer-94138"} 0

@VictorBHub does this look like an ok fix for #8 ?

I've built solsson/burrow-exporter:api-v3@sha256:dd690c04ae31c62e4d7d5398f24f368fb2c48046ec3ae68bbc7582c114819a7b and updated Yolean/kubernetes-kafka#125

@VictorBHub
Copy link

looks great..

@ercliou-zz
Copy link

ercliou-zz commented Jan 28, 2018

One small detail:
I don't think this metric "maxoffset" exists anymore:
https://github.com/jirwin/burrow_exporter/blob/master/burrow_exporter/exporter.go#L54

I haven't used v2, not sure what this metric means, but the Burrow wiki for v3 doesn't mention this metric. Also I've just tested on Burrow v3, it's not exposing this field.

(commenting this on another PR too, not sure which will be the final one)

@jirwin
Copy link
Owner

jirwin commented Jan 28, 2018

Does this break compatibility with the v2 api? I'd merge a change that didn't.

@ercliou-zz
Copy link

@jirwin Burrow broke backward compat when they went from v2 to v3 (the uri changed among other schema changes). This will break people using Burrow v2.

@solsson
Copy link
Author

solsson commented Mar 6, 2018

#12 was merged. I've built solsson/burrow-exporter@sha256:379199629e22a25e140a391f0a52bb5e222e6a639ce2314d8a995d0eeecb6c3f from master (with 63de275 though, for Yolean/kubernetes-kafka).

@solsson solsson closed this Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants