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 default metricset in zookeeper module #6674

Merged
merged 2 commits into from
Mar 28, 2018
Merged
Changes from 1 commit
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
Next Next commit
Set default metricset in zookeeper module
  • Loading branch information
jsoriano committed Mar 27, 2018
commit e90cf0b3d70dc6a51e6546bf39dee9ccc78505b5
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
@@ -261,6 +261,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- Add experimental module to collect metrics from munin nodes. {pull}6517[6517]
- Add support for wildcards and explicit metrics grouping in jolokia/jmx. {pull}6462[6462]
- Set `collector` as default metricset in Prometheus module. {pull}6636[6636]
- Set `mntr` as default metricset in Zookeeper module. {pull}6674[6674]

*Packetbeat*

4 changes: 2 additions & 2 deletions metricbeat/docs/modules/zookeeper.asciidoc
Original file line number Diff line number Diff line change
@@ -5,7 +5,8 @@ This file is generated! See scripts/docs_collector.py
[[metricbeat-module-zookeeper]]
== ZooKeeper module

The ZooKeeper module fetches statistics from the ZooKeeper service.
The ZooKeeper module fetches statistics from the ZooKeeper service. The default
metricset is `mntr`.

[float]
=== Compatibility
@@ -24,7 +25,6 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: zookeeper
metricsets: ["mntr"]
period: 10s
hosts: ["localhost:2181"]
----
1 change: 1 addition & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
@@ -501,6 +501,7 @@ metricbeat.modules:

#------------------------------ ZooKeeper Module -----------------------------
- module: zookeeper
enabled: true
metricsets: ["mntr"]
period: 10s
hosts: ["localhost:2181"]
5 changes: 5 additions & 0 deletions metricbeat/module/zookeeper/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- module: zookeeper
enabled: true
metricsets: ["mntr"]
period: 10s
hosts: ["localhost:2181"]
1 change: 0 additions & 1 deletion metricbeat/module/zookeeper/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- module: zookeeper
metricsets: ["mntr"]
period: 10s
hosts: ["localhost:2181"]
3 changes: 2 additions & 1 deletion metricbeat/module/zookeeper/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
The ZooKeeper module fetches statistics from the ZooKeeper service.
The ZooKeeper module fetches statistics from the ZooKeeper service. The default
metricset is `mntr`.

[float]
=== Compatibility
7 changes: 4 additions & 3 deletions metricbeat/module/zookeeper/mntr/mntr.go
Original file line number Diff line number Diff line change
@@ -36,9 +36,10 @@ import (
)

func init() {
if err := mb.Registry.AddMetricSet("zookeeper", "mntr", New, parse.PassThruHostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("zookeeper", "mntr", New,
mb.WithHostParser(parse.PassThruHostParser),
mb.DefaultMetricSet(),
)
}

// MetricSet for fetching ZooKeeper health metrics.
1 change: 0 additions & 1 deletion metricbeat/modules.d/zookeeper.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- module: zookeeper
metricsets: ["mntr"]
period: 10s
hosts: ["localhost:2181"]