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 in Elasticsearch module #6755

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

The Elasticsearch module contains a minimal set of metrics to enable monitoring of Elasticsearch across multiple versions. To monitor more Elasticsearch metrics, use our {monitoringdoc}/xpack-monitoring.html[X-Pack monitoring] which is available under a free basic license.

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


[float]
=== Example configuration
Expand All @@ -20,8 +22,6 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: elasticsearch
metricsets: ["node", "node_stats"]
period: 10s
hosts: ["localhost:9200"]
----

Expand Down
4 changes: 4 additions & 0 deletions metricbeat/module/elasticsearch/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- module: elasticsearch
metricsets: ["node", "node_stats"]
period: 10s
hosts: ["localhost:9200"]
2 changes: 0 additions & 2 deletions metricbeat/module/elasticsearch/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- module: elasticsearch
metricsets: ["node", "node_stats"]
period: 10s
hosts: ["localhost:9200"]
2 changes: 2 additions & 0 deletions metricbeat/module/elasticsearch/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
The Elasticsearch module contains a minimal set of metrics to enable monitoring of Elasticsearch across multiple versions. To monitor more Elasticsearch metrics, use our {monitoringdoc}/xpack-monitoring.html[X-Pack monitoring] which is available under a free basic license.

The default metricsets are `node` and `node_stats`.
7 changes: 4 additions & 3 deletions metricbeat/module/elasticsearch/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("elasticsearch", "node", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("elasticsearch", "node", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

var (
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/elasticsearch/node_stats/node_stats.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("elasticsearch", "node_stats", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("elasticsearch", "node_stats", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

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