feat: Kafka Add metadata full to config (#9833)
This commit is contained in:
parent
06f2a37b4a
commit
8265969f52
|
|
@ -1081,6 +1081,9 @@
|
||||||
# ## SASL protocol version. When connecting to Azure EventHub set to 0.
|
# ## SASL protocol version. When connecting to Azure EventHub set to 0.
|
||||||
# # sasl_version = 1
|
# # sasl_version = 1
|
||||||
#
|
#
|
||||||
|
# # Disable Kafka metadata full fetch
|
||||||
|
# # metadata_full = false
|
||||||
|
#
|
||||||
# ## Data format to output.
|
# ## Data format to output.
|
||||||
# ## Each data format has its own unique set of configuration options, read
|
# ## Each data format has its own unique set of configuration options, read
|
||||||
# ## more about them here:
|
# ## more about them here:
|
||||||
|
|
@ -7618,6 +7621,9 @@
|
||||||
# ## SASL protocol version. When connecting to Azure EventHub set to 0.
|
# ## SASL protocol version. When connecting to Azure EventHub set to 0.
|
||||||
# # sasl_version = 1
|
# # sasl_version = 1
|
||||||
#
|
#
|
||||||
|
# # Disable Kafka metadata full fetch
|
||||||
|
# # metadata_full = false
|
||||||
|
#
|
||||||
# ## Name of the consumer group.
|
# ## Name of the consumer group.
|
||||||
# # consumer_group = "telegraf_metrics_consumers"
|
# # consumer_group = "telegraf_metrics_consumers"
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,9 @@ type Config struct {
|
||||||
|
|
||||||
// EnableTLS deprecated
|
// EnableTLS deprecated
|
||||||
EnableTLS *bool `toml:"enable_tls"`
|
EnableTLS *bool `toml:"enable_tls"`
|
||||||
|
|
||||||
|
// Disable full metadata fetching
|
||||||
|
MetadataFull *bool `toml:"metadata_full"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetConfig on the sarama.Config object from the Config struct.
|
// SetConfig on the sarama.Config object from the Config struct.
|
||||||
|
|
@ -89,5 +92,10 @@ func (k *Config) SetConfig(config *sarama.Config) error {
|
||||||
config.Net.TLS.Enable = true
|
config.Net.TLS.Enable = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if k.MetadataFull != nil {
|
||||||
|
// Defaults to true in Sarama
|
||||||
|
config.Metadata.Full = *k.MetadataFull
|
||||||
|
}
|
||||||
|
|
||||||
return k.SetSASLConfig(config)
|
return k.SetSASLConfig(config)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,9 @@ and use the old zookeeper connection method.
|
||||||
## SASL protocol version. When connecting to Azure EventHub set to 0.
|
## SASL protocol version. When connecting to Azure EventHub set to 0.
|
||||||
# sasl_version = 1
|
# sasl_version = 1
|
||||||
|
|
||||||
|
# Disable Kafka metadata full fetch
|
||||||
|
# metadata_full = false
|
||||||
|
|
||||||
## Name of the consumer group.
|
## Name of the consumer group.
|
||||||
# consumer_group = "telegraf_metrics_consumers"
|
# consumer_group = "telegraf_metrics_consumers"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,9 @@ const sampleConfig = `
|
||||||
## SASL protocol version. When connecting to Azure EventHub set to 0.
|
## SASL protocol version. When connecting to Azure EventHub set to 0.
|
||||||
# sasl_version = 1
|
# sasl_version = 1
|
||||||
|
|
||||||
|
# Disable Kafka metadata full fetch
|
||||||
|
# metadata_full = false
|
||||||
|
|
||||||
## Name of the consumer group.
|
## Name of the consumer group.
|
||||||
# consumer_group = "telegraf_metrics_consumers"
|
# consumer_group = "telegraf_metrics_consumers"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,9 @@ This plugin writes to a [Kafka Broker](http://kafka.apache.org/07/quickstart.htm
|
||||||
## SASL protocol version. When connecting to Azure EventHub set to 0.
|
## SASL protocol version. When connecting to Azure EventHub set to 0.
|
||||||
# sasl_version = 1
|
# sasl_version = 1
|
||||||
|
|
||||||
|
# Disable Kafka metadata full fetch
|
||||||
|
# metadata_full = false
|
||||||
|
|
||||||
## Data format to output.
|
## Data format to output.
|
||||||
## Each data format has its own unique set of configuration options, read
|
## Each data format has its own unique set of configuration options, read
|
||||||
## more about them here:
|
## more about them here:
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,9 @@ var sampleConfig = `
|
||||||
## SASL protocol version. When connecting to Azure EventHub set to 0.
|
## SASL protocol version. When connecting to Azure EventHub set to 0.
|
||||||
# sasl_version = 1
|
# sasl_version = 1
|
||||||
|
|
||||||
|
# Disable Kafka metadata full fetch
|
||||||
|
# metadata_full = false
|
||||||
|
|
||||||
## Data format to output.
|
## Data format to output.
|
||||||
## Each data format has its own unique set of configuration options, read
|
## Each data format has its own unique set of configuration options, read
|
||||||
## more about them here:
|
## more about them here:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue