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

Expose kafka client id #4418

Merged
merged 6 commits into from
Jul 13, 2018
Merged

Expose kafka client id #4418

merged 6 commits into from
Jul 13, 2018

Conversation

PhoenixRion
Copy link
Contributor

The team running the Kafka I was using required that I set the client id for reads and writes. For reference, the default client id is "sarama"

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

I ran "make lint" and "make test", the latter showed failures for unrelated files. (outputs/socket_writer, outputs/influxdb, inputs/syslog, inputs/socket_listener, inputs/ping, inputs/http_response, inputs/fluentd)

@danielnelson danielnelson added this to the 1.8.0 milestone Jul 12, 2018
@danielnelson danielnelson added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin area/kafka labels Jul 12, 2018
Copy link
Contributor

@danielnelson danielnelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What platform are you running make test on? If it's not Linux amd64 can you open a new issue for the test failures?

@@ -17,6 +17,7 @@ import (

type Kafka struct {
ConsumerGroup string
ClientId string `toml:"client_id"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call the variable ClientID

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -22,6 +22,9 @@ and use the old zookeeper connection method.
## Offset (must be either "oldest" or "newest")
offset = "oldest"

## Optional client id
# client_id = "my_client"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have the example ID be Telegraf? Perhaps this should be the default instead of "sarama"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value of sarama is set by the underlying implementation used by both kafka plugins. I can add the logic to set the id to "Telegraf" when a value is not supplied.

@PhoenixRion
Copy link
Contributor Author

ATM I am running the test on a Mac v10.13.2 (17C88)

@PhoenixRion
Copy link
Contributor Author

#4420

@danielnelson danielnelson merged commit c8f0003 into influxdata:master Jul 13, 2018
@danielnelson
Copy link
Contributor

Thank you!

rgitzel pushed a commit to rgitzel/telegraf that referenced this pull request Oct 17, 2018
otherpirate pushed a commit to otherpirate/telegraf that referenced this pull request Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kafka feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants