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

Remove metadata prefix from config as not needed #3095

Merged
merged 1 commit into from
Dec 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions metricbeat/_meta/beat.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ metricbeat.modules:
#hosts: ["localhost:9092"]

#client_id: metricbeat

#metadata.retries: 3
#metadata.backoff: 250ms
#retries: 3
#backoff: 250ms

# List of Topics to query metadata for. If empty, all topics will be queried.
#topics: []
Expand Down
5 changes: 2 additions & 3 deletions metricbeat/docs/modules/kafka.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ metricbeat.modules:
#hosts: ["localhost:9092"]
#client_id: metricbeat
#metadata.retries: 3
#metadata.backoff: 250ms
#retries: 3
#backoff: 250ms
# List of Topics to query metadata for. If empty, all topics will be queried.
#topics: []
Expand Down
5 changes: 2 additions & 3 deletions metricbeat/metricbeat.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ metricbeat.modules:
#hosts: ["localhost:9092"]

#client_id: metricbeat

#metadata.retries: 3
#metadata.backoff: 250ms
#retries: 3
#backoff: 250ms

# List of Topics to query metadata for. If empty, all topics will be queried.
#topics: []
Expand Down
5 changes: 2 additions & 3 deletions metricbeat/module/kafka/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
#hosts: ["localhost:9092"]

#client_id: metricbeat

#metadata.retries: 3
#metadata.backoff: 250ms
#retries: 3
#backoff: 250ms

# List of Topics to query metadata for. If empty, all topics will be queried.
#topics: []
Expand Down
11 changes: 4 additions & 7 deletions metricbeat/module/kafka/partition/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
)

type connConfig struct {
Metadata metaConfig `config:"metadata"`
Retries int `config:"retries" validate:"min=0"`
Backoff time.Duration `config:"backoff" validate:"min=0"`
TLS *outputs.TLSConfig `config:"ssl"`
Username string `config:"username"`
Password string `config:"password"`
Expand All @@ -17,15 +18,11 @@ type connConfig struct {
}

type metaConfig struct {
Retries int `config:"retries" validate:"min=0"`
Backoff time.Duration `config:"backoff" validate:"min=0"`
}

var defaultConfig = connConfig{
Metadata: metaConfig{
Retries: 3,
Backoff: 250 * time.Millisecond,
},
Retries: 3,
Backoff: 250 * time.Millisecond,
TLS: nil,
Username: "",
Password: "",
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/module/kafka/partition/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
cfg.Net.DialTimeout = base.Module().Config().Timeout
cfg.Net.ReadTimeout = base.Module().Config().Timeout
cfg.ClientID = config.ClientID
cfg.Metadata.Retry.Max = config.Metadata.Retries
cfg.Metadata.Retry.Backoff = config.Metadata.Backoff
cfg.Metadata.Retry.Max = config.Retries
cfg.Metadata.Retry.Backoff = config.Backoff
if tls != nil {
cfg.Net.TLS.Enable = true
cfg.Net.TLS.Config = tls.BuildModuleConfig("")
Expand Down