ogibayashi / kafka-topic-exporter

Consume Kafka topics and export to Prometheus
Apache License 2.0
42 stars 25 forks source link

Consul service for discovering Kafka servers #6

Closed felipe-conde-benavides closed 6 years ago

felipe-conde-benavides commented 6 years ago

It has been added a new optional functionality for allowing to use a Consul service for discovering the available Kafka servers.

This new functionality requires a new Consul client library (added in pom.xml file), and two new properties in the configuration file (consul.server.url and consul.kafka.servicename):

New library from: https://github.com/rickfast/consul-client

Example of new properties:

# Consul server URL (including protocol: http/https) consul.server.url=http://localhost:8500

# Consul service name for filtering the Kafka service consul.kafka.servicename=kafka

If these two variable exist and the Consul service respond some valid information, and only in this case, the retrieved information will overwrite the previous existing property called bootstrap.servers.

ogibayashi commented 6 years ago

Sorry for the delay and thanks for your contribution!