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

Make all metricsets in Kafka module defaults. #6759

Merged
merged 1 commit into from
Apr 4, 2018
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
24 changes: 1 addition & 23 deletions metricbeat/docs/modules/kafka.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ beta[]

This is the Kafka module.

The default metricsets are `consumergroup` and `partition`.


[float]
Expand All @@ -21,30 +22,7 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: kafka
metricsets: ["partition"]
period: 10s
hosts: ["localhost:9092"]

#client_id: metricbeat
#retries: 3
#backoff: 250ms

# List of Topics to query metadata for. If empty, all topics will be queried.
#topics: []

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"

# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"

# SASL authentication
#username: ""
#password: ""
----

[float]
Expand Down
3 changes: 2 additions & 1 deletion metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,10 @@ metricbeat.modules:

#-------------------------------- Kafka Module -------------------------------
- module: kafka
metricsets: ["partition"]
metricsets: ["consumergroup", "partition"]
period: 10s
hosts: ["localhost:9092"]
enabled: true

#client_id: metricbeat
#retries: 3
Expand Down
26 changes: 26 additions & 0 deletions metricbeat/module/kafka/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- module: kafka
metricsets: ["consumergroup", "partition"]
period: 10s
hosts: ["localhost:9092"]
enabled: true

#client_id: metricbeat
#retries: 3
#backoff: 250ms

# List of Topics to query metadata for. If empty, all topics will be queried.
#topics: []

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"

# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"

# SASL authentication
#username: ""
#password: ""
23 changes: 0 additions & 23 deletions metricbeat/module/kafka/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,2 @@
- module: kafka
metricsets: ["partition"]
period: 10s
hosts: ["localhost:9092"]

#client_id: metricbeat
#retries: 3
#backoff: 250ms

# List of Topics to query metadata for. If empty, all topics will be queried.
#topics: []

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"

# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"

# SASL authentication
#username: ""
#password: ""
1 change: 1 addition & 0 deletions metricbeat/module/kafka/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
This is the Kafka module.

The default metricsets are `consumergroup` and `partition`.
6 changes: 3 additions & 3 deletions metricbeat/module/kafka/consumergroup/consumergroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

// init registers the MetricSet with the central registry.
func init() {
if err := mb.Registry.AddMetricSet("kafka", "consumergroup", New); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("kafka", "consumergroup", New,
mb.DefaultMetricSet(),
)
}

// MetricSet type defines all fields of the MetricSet
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/kafka/partition/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ import (

// init registers the partition MetricSet with the central registry.
func init() {
if err := mb.Registry.AddMetricSet("kafka", "partition", New, parse.PassThruHostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("kafka", "partition", New,
mb.WithHostParser(parse.PassThruHostParser),
mb.DefaultMetricSet(),
)
}

// MetricSet type defines all fields of the partition MetricSet
Expand Down
23 changes: 0 additions & 23 deletions metricbeat/modules.d/kafka.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,25 +1,2 @@
- module: kafka
metricsets: ["partition"]
period: 10s
hosts: ["localhost:9092"]

#client_id: metricbeat
#retries: 3
#backoff: 250ms

# List of Topics to query metadata for. If empty, all topics will be queried.
#topics: []

# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"

# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"

# SASL authentication
#username: ""
#password: ""