Skip to content

Commit

Permalink
Improve eventhub plugin documentation
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
marinsky committed Jan 21, 2021
1 parent eb42f11 commit b4e68b8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions plugins/inputs/eventhub_consumer/eventhub_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ func (*EventHub) SampleConfig() string {
## This requires one of the following sets of environment variables to be set:
##
## 1) Expected Environment Variables:
## - "EVENTHUB_NAMESPACE"
## - "EVENTHUB_NAME"
## - "EVENTHUB_CONNECTION_STRING"
##
## 2) Expected Environment Variables:
Expand All @@ -79,8 +77,17 @@ func (*EventHub) SampleConfig() string {
## - "EVENTHUB_KEY_NAME"
## - "EVENTHUB_KEY_VALUE"
## 3) Expected Environment Variables:
## - "EVENTHUB_NAMESPACE"
## - "EVENTHUB_NAME"
## - "AZURE_TENANT_ID"
## - "AZURE_CLIENT_ID"
## - "AZURE_CLIENT_SECRET"
## Uncommenting the option below will create an Event Hub client based solely on the connection string.
## This can either be the associated environment variable or hard coded directly.
## If this option is uncommented, environment variables will be ignored.
## Connection string should contain EventHubName (EntityPath)
# connection_string = ""
## Set persistence directory to a valid folder to use a file persister instead of an in-memory persister
Expand Down Expand Up @@ -139,7 +146,7 @@ func (*EventHub) SampleConfig() string {
## 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"
data_format = "json"
`
}

Expand Down

0 comments on commit b4e68b8

Please sign in to comment.