diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index a7f9f1b2c69d..174eec9abf70 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -264,8 +264,10 @@ 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] -- Set `status` as default metricset in Apache module. {pull}[] +- Set `status` as default metricset in Apache module. {pull}6673[6673] +- Set `namespace` as default metricset in Aerospike module. {pull}6669[6669] *Packetbeat* diff --git a/metricbeat/docs/modules/aerospike.asciidoc b/metricbeat/docs/modules/aerospike.asciidoc index a1fde6987db4..c25c33db964b 100644 --- a/metricbeat/docs/modules/aerospike.asciidoc +++ b/metricbeat/docs/modules/aerospike.asciidoc @@ -7,7 +7,7 @@ This file is generated! See scripts/docs_collector.py beta[] -The Aerospike module uses the http://www.aerospike.com/docs/reference/info[Info command] to collect metrics. +The Aerospike module uses the http://www.aerospike.com/docs/reference/info[Info command] to collect metrics. The default metricset is `namespace`. [float] === Compatibility @@ -25,9 +25,6 @@ in <>. Here is an example configuration: ---- metricbeat.modules: - module: aerospike - metricsets: ["namespace"] - enabled: false - period: 10s hosts: ["localhost:3000"] ---- 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 8553507c9df2..8422354127d9 100644 --- a/metricbeat/metricbeat.reference.yml +++ b/metricbeat/metricbeat.reference.yml @@ -117,7 +117,7 @@ metricbeat.modules: #------------------------------ Aerospike Module ----------------------------- - module: aerospike metricsets: ["namespace"] - enabled: false + enabled: true period: 10s hosts: ["localhost:3000"] @@ -502,6 +502,7 @@ metricbeat.modules: #------------------------------ ZooKeeper Module ----------------------------- - module: zookeeper + enabled: true metricsets: ["mntr"] period: 10s hosts: ["localhost:2181"] diff --git a/metricbeat/module/aerospike/_meta/config.reference.yml b/metricbeat/module/aerospike/_meta/config.reference.yml new file mode 100644 index 000000000000..38aca68f9514 --- /dev/null +++ b/metricbeat/module/aerospike/_meta/config.reference.yml @@ -0,0 +1,5 @@ +- module: aerospike + metricsets: ["namespace"] + enabled: true + period: 10s + hosts: ["localhost:3000"] diff --git a/metricbeat/module/aerospike/_meta/config.yml b/metricbeat/module/aerospike/_meta/config.yml index 787e314dc60d..0a4a883f4749 100644 --- a/metricbeat/module/aerospike/_meta/config.yml +++ b/metricbeat/module/aerospike/_meta/config.yml @@ -1,5 +1,2 @@ - module: aerospike - metricsets: ["namespace"] - enabled: false - period: 10s hosts: ["localhost:3000"] diff --git a/metricbeat/module/aerospike/_meta/docs.asciidoc b/metricbeat/module/aerospike/_meta/docs.asciidoc index 9d1f59230d34..3cbf6660edf9 100644 --- a/metricbeat/module/aerospike/_meta/docs.asciidoc +++ b/metricbeat/module/aerospike/_meta/docs.asciidoc @@ -1,4 +1,4 @@ -The Aerospike module uses the http://www.aerospike.com/docs/reference/info[Info command] to collect metrics. +The Aerospike module uses the http://www.aerospike.com/docs/reference/info[Info command] to collect metrics. The default metricset is `namespace`. [float] === Compatibility diff --git a/metricbeat/module/aerospike/namespace/namespace.go b/metricbeat/module/aerospike/namespace/namespace.go index 1dafef5eae69..e36519fef1cb 100644 --- a/metricbeat/module/aerospike/namespace/namespace.go +++ b/metricbeat/module/aerospike/namespace/namespace.go @@ -16,9 +16,9 @@ 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("aerospike", "namespace", New); err != nil { - panic(err) - } + mb.Registry.MustAddMetricSet("aerospike", "namespace", New, + mb.DefaultMetricSet(), + ) } // MetricSet type defines all fields of the MetricSet 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/aerospike.yml.disabled b/metricbeat/modules.d/aerospike.yml.disabled index 787e314dc60d..0a4a883f4749 100644 --- a/metricbeat/modules.d/aerospike.yml.disabled +++ b/metricbeat/modules.d/aerospike.yml.disabled @@ -1,5 +1,2 @@ - module: aerospike - metricsets: ["namespace"] - enabled: false - period: 10s hosts: ["localhost:3000"] 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"]