diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index a6de63efb796..d235db381c9d 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -264,6 +264,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] - Set default metricsets in vSphere module. {pull}6676[6676] *Packetbeat* diff --git a/metricbeat/docs/modules/zookeeper.asciidoc b/metricbeat/docs/modules/zookeeper.asciidoc index 3f0e63174a34..bc3fc877bdfb 100644 --- a/metricbeat/docs/modules/zookeeper.asciidoc +++ b/metricbeat/docs/modules/zookeeper.asciidoc @@ -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 <>. Here is an example configuration: ---- metricbeat.modules: - module: zookeeper - metricsets: ["mntr"] period: 10s hosts: ["localhost:2181"] ---- diff --git a/metricbeat/metricbeat.reference.yml b/metricbeat/metricbeat.reference.yml index 73d26d2e3f3b..db5a1a725ba4 100644 --- a/metricbeat/metricbeat.reference.yml +++ b/metricbeat/metricbeat.reference.yml @@ -501,6 +501,7 @@ metricbeat.modules: #------------------------------ ZooKeeper Module ----------------------------- - module: zookeeper + enabled: true metricsets: ["mntr"] period: 10s hosts: ["localhost:2181"] diff --git a/metricbeat/module/zookeeper/_meta/config.reference.yml b/metricbeat/module/zookeeper/_meta/config.reference.yml new file mode 100644 index 000000000000..04742813c55f --- /dev/null +++ b/metricbeat/module/zookeeper/_meta/config.reference.yml @@ -0,0 +1,5 @@ +- module: zookeeper + enabled: true + metricsets: ["mntr"] + period: 10s + hosts: ["localhost:2181"] diff --git a/metricbeat/module/zookeeper/_meta/config.yml b/metricbeat/module/zookeeper/_meta/config.yml index 63543cefdd71..fb77d08fffa9 100644 --- a/metricbeat/module/zookeeper/_meta/config.yml +++ b/metricbeat/module/zookeeper/_meta/config.yml @@ -1,4 +1,3 @@ - module: zookeeper - metricsets: ["mntr"] period: 10s hosts: ["localhost:2181"] diff --git a/metricbeat/module/zookeeper/_meta/docs.asciidoc b/metricbeat/module/zookeeper/_meta/docs.asciidoc index 8675c576c480..34b3f9500102 100644 --- a/metricbeat/module/zookeeper/_meta/docs.asciidoc +++ b/metricbeat/module/zookeeper/_meta/docs.asciidoc @@ -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 diff --git a/metricbeat/module/zookeeper/mntr/mntr.go b/metricbeat/module/zookeeper/mntr/mntr.go index 2cc27c71ef65..396bc0f0f9b6 100644 --- a/metricbeat/module/zookeeper/mntr/mntr.go +++ b/metricbeat/module/zookeeper/mntr/mntr.go @@ -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. diff --git a/metricbeat/modules.d/zookeeper.yml.disabled b/metricbeat/modules.d/zookeeper.yml.disabled index 63543cefdd71..fb77d08fffa9 100644 --- a/metricbeat/modules.d/zookeeper.yml.disabled +++ b/metricbeat/modules.d/zookeeper.yml.disabled @@ -1,4 +1,3 @@ - module: zookeeper - metricsets: ["mntr"] period: 10s hosts: ["localhost:2181"]