Skip to content

Improve eventhub_consumer input documentation#8731

Merged
ssoroka merged 4 commits intoinfluxdata:masterfrom
marinsky:eventhub-input-documentation
May 20, 2021
Merged

Improve eventhub_consumer input documentation#8731
ssoroka merged 4 commits intoinfluxdata:masterfrom
marinsky:eventhub-input-documentation

Conversation

@marinsky
Copy link
Copy Markdown
Contributor

This PR improves documentation (README and sample config) for eventhub_consumer input plugin:

- keep only EVENTHUB_CONNECTION_STRING in set influxdata#1 as name and namespace
  are taken from connection string
- add env vars set influxdata#3 to show how to connect to eventhub using service
  principal
- comment that env vars are ignored when connection_string option is
  specified
- comment on importance of EntityPath in connection_string
- use json as default data format, as it's used more often with
  eventhubs
- Addresses issues issues like influxdata#8643
Copy link
Copy Markdown
Contributor

@telegraf-tiger telegraf-tiger bot left a comment

Choose a reason for hiding this comment

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

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@marinsky
Copy link
Copy Markdown
Contributor Author

!signed-cla

Copy link
Copy Markdown
Contributor

@telegraf-tiger telegraf-tiger bot left a comment

Choose a reason for hiding this comment

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

🤝 ✅ CLA has been signed. Thank you!

## Each data format has its own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "influx"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

default should probably be left at influx.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you for a quick and thorough review!

No problem, I can change it back, but are you absolutely sure about it? influx format is not what you see every day in kafka topics, json from the other side is one of the most popular options. The most popular should probably be default.

That line was the main reason of spending 2h investigating what's going on when I started using the plugin. The same line is the main reason #8643 was opened, because if the format is not correct, the message silently disappears.

Please, consider and let me know.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nvm, I moved back to influx, json docs have enough examples and there is a clear link to other data formats above this line.
To address issues like #8643 I will open another PR to improve logging when received data doesn't correspond to the specified format.


1. Create an Azure IoT Hub by following any of the guides provided here: https://docs.microsoft.com/en-us/azure/iot-hub/
2. Create a device, for example a [simulated Raspberry Pi](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-raspberry-pi-web-simulator-get-started)
3. The connection string needed for the plugin is located under *Shared access policies*, both the *iothubowner* and *service* policies should work
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this change is missing from sampleConfig, they should match.

Copy link
Copy Markdown
Contributor

@ssoroka ssoroka left a comment

Choose a reason for hiding this comment

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

JSON example probably doesn't belong here and is better off with the json configuration documentation. We could link there instead.

@sjwang90 sjwang90 added the docs Issues related to Telegraf documentation and configuration descriptions label Jan 26, 2021
- remove json example
- revert md format change in Readme
- revent default format change
@marinsky marinsky force-pushed the eventhub-input-documentation branch from 61a3bb6 to 5c84c15 Compare January 31, 2021 02:15
@marinsky marinsky requested a review from ssoroka January 31, 2021 02:16
@marinsky
Copy link
Copy Markdown
Contributor Author

@ssoroka Can we please find time to re-review this. Should be quick. Just a documentation improvement. I have another eventhub improvement coming. Thanks.

@ssoroka ssoroka merged commit 0e55eed into influxdata:master May 20, 2021
@ssoroka
Copy link
Copy Markdown
Contributor

ssoroka commented May 20, 2021

Thanks for the contribution :)

arstercz pushed a commit to arstercz/telegraf that referenced this pull request Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Issues related to Telegraf documentation and configuration descriptions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants