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

Kafka Input plugin - allow access to broker list through a VIP #15367

Closed
nbcohen opened this issue May 16, 2024 · 5 comments · Fixed by #15368
Closed

Kafka Input plugin - allow access to broker list through a VIP #15367

nbcohen opened this issue May 16, 2024 · 5 comments · Fixed by #15368
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@nbcohen
Copy link

nbcohen commented May 16, 2024

Use Case

Current format in kafka input plugin:

[[inputs.kafka_consumer]]
brokers = [ "myBroker1:1234, myBroker2:1234" ]
topics = [ "myopic" ]
precision = "1s"
etc. etc.

The brokers entry tells me which kafka broker to connect to.

Our kafka team has set up a VIP entry which maps to a list of a dozen or more brokers, so if one is down, the connection should still work.

The Sarama library supports VIP access in telegraf 1.29+ and we are using telegraf 1.30 at the moment so we should have the capability.

There is a new parameter - client.dns.lookup: resolve_canonical_bootstrap_servers_only

which seems to be required for this to work, but telegraf doesn't currently support it. Can you add the capability to use that Sarama feature so I can set brokers="myVIP:1234" and have it resolve to the broker list...

Thanks,

nbc

Expected behavior

With this new parameter we should be able to list only the VIP address in the telegraf config and have it connect to any available kafka broker.

Actual behavior

Not currently available

Additional info

No response

@nbcohen nbcohen added the feature request Requests for new plugin and for new features to existing plugins label May 16, 2024
@InfluxJay
Copy link

Potentially, this would allow the Kafka admins to take brokers out of service for maintenance without affecting the telegraf processing, which I believe is the aim @nbcohen ?

@powersj
Copy link
Contributor

powersj commented May 16, 2024

@nbcohen,

I've put up #15368 which will have artifacts attached in a few moments. Please download and try the artifacts and let us know if exposing the new config option resolves your request.

In your config you will need to add the following to inputs.kafka_consumer`:

[[inputs.kafka_consumer]]
  resolve_canonical_bootstrap_servers_only = true

Thanks!

@powersj powersj added the waiting for response waiting for response from contributor label May 16, 2024
@nbcohen
Copy link
Author

nbcohen commented May 16, 2024 via email

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label May 16, 2024
@powersj powersj added the waiting for response waiting for response from contributor label May 16, 2024
@powersj
Copy link
Contributor

powersj commented May 29, 2024

Hi,

I'm going to have the team review the PR and probably land this. Our next release is coming up and I don't want to miss this.

Thanks!

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label May 29, 2024
@nbcohen
Copy link
Author

nbcohen commented May 31, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants