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

Set all metricsets as default for Logstash module #6763

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
5 changes: 1 addition & 4 deletions metricbeat/docs/modules/logstash.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ beta[]

This is the Logstash module.

The default metricsets are `node` and `node_stats`.


[float]
Expand All @@ -21,11 +22,7 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: logstash
metricsets: ["node", "node_stats"]
enabled: false
period: 10s
hosts: ["localhost:9600"]

----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
Expand Down
3 changes: 1 addition & 2 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,10 @@ metricbeat.modules:
#------------------------------ Logstash Module ------------------------------
- module: logstash
metricsets: ["node", "node_stats"]
enabled: false
enabled: true
period: 10s
hosts: ["localhost:9600"]


#------------------------------ Memcached Module -----------------------------
- module: memcached
metricsets: ["stats"]
Expand Down
5 changes: 5 additions & 0 deletions metricbeat/module/logstash/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- module: logstash
metricsets: ["node", "node_stats"]
enabled: true
period: 10s
hosts: ["localhost:9600"]
4 changes: 0 additions & 4 deletions metricbeat/module/logstash/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
- module: logstash
metricsets: ["node", "node_stats"]
enabled: false
period: 10s
hosts: ["localhost:9600"]

1 change: 1 addition & 0 deletions metricbeat/module/logstash/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
This is the Logstash module.

The default metricsets are `node` and `node_stats`.
7 changes: 4 additions & 3 deletions metricbeat/module/logstash/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import (
// init registers the MetricSet with the central registry.
// The New method will be called after the setup of the module and before starting to fetch data
func init() {
if err := mb.Registry.AddMetricSet("logstash", "node", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("logstash", "node", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

var (
Expand Down
1 change: 1 addition & 0 deletions metricbeat/module/logstash/node_stats/node_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func init() {
mb.Registry.MustAddMetricSet(moduleName, metricsetName, New,
mb.WithHostParser(hostParser),
mb.WithNamespace(namespace),
mb.DefaultMetricSet(),
)
}

Expand Down
4 changes: 0 additions & 4 deletions metricbeat/modules.d/logstash.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
- module: logstash
metricsets: ["node", "node_stats"]
enabled: false
period: 10s
hosts: ["localhost:9600"]