Document the behavior of an unset routing key (#6983)

This commit is contained in:
Daniel Nelson 2020-02-04 16:40:00 -08:00 committed by GitHub
parent e51d9a3575
commit 0cc71dbd51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 10 deletions

View File

@ -46,13 +46,21 @@ This plugin writes to a [Kafka Broker](http://kafka.apache.org/07/quickstart.htm
# keys = ["foo", "bar"] # keys = ["foo", "bar"]
# separator = "_" # separator = "_"
## Telegraf tag to use as a routing key ## The routing tag specifies a tagkey on the metric whose value is used as
## ie, if this tag exists, its value will be used as the routing key ## the message key. The message key is used to determine which partition to
## send the message to. This tag is prefered over the routing_key option.
routing_tag = "host" routing_tag = "host"
## Static routing key. Used when no routing_tag is set or as a fallback ## The routing key is set as the message key and used to determine which
## when the tag specified in routing tag is not found. If set to "random", ## partition to send the message to. This value is only used when no
## a random value will be generated for each message. ## routing_tag is set or as a fallback when the tag specified in routing tag
## is not found.
##
## If set to "random", a random value will be generated for each message.
##
## When unset, no message key is added and each message is routed to a random
## partition.
##
## ex: routing_key = "random" ## ex: routing_key = "random"
## routing_key = "telegraf" ## routing_key = "telegraf"
# routing_key = "" # routing_key = ""

View File

@ -130,13 +130,21 @@ var sampleConfig = `
# keys = ["foo", "bar"] # keys = ["foo", "bar"]
# separator = "_" # separator = "_"
## Telegraf tag to use as a routing key ## The routing tag specifies a tagkey on the metric whose value is used as
## ie, if this tag exists, its value will be used as the routing key ## the message key. The message key is used to determine which partition to
## send the message to. This tag is prefered over the routing_key option.
routing_tag = "host" routing_tag = "host"
## Static routing key. Used when no routing_tag is set or as a fallback ## The routing key is set as the message key and used to determine which
## when the tag specified in routing tag is not found. If set to "random", ## partition to send the message to. This value is only used when no
## a random value will be generated for each message. ## routing_tag is set or as a fallback when the tag specified in routing tag
## is not found.
##
## If set to "random", a random value will be generated for each message.
##
## When unset, no message key is added and each message is routed to a random
## partition.
##
## ex: routing_key = "random" ## ex: routing_key = "random"
## routing_key = "telegraf" ## routing_key = "telegraf"
# routing_key = "" # routing_key = ""