Skip to content

Commit

Permalink
Merge pull request #6683 from ruflin/couchbase-defaults
Browse files Browse the repository at this point in the history
Set all couchbase metricsets as default in metricbeat module.
  • Loading branch information
jsoriano authored Apr 3, 2018
2 parents fbc61e8 + b9bbacf commit 74b24d0
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 18 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- Set `namespace` as default metricset in Aerospike module. {pull}6669[6669]
- Set `service` as default metricset in Windows module. {pull}6675[6675]
- Set all metricsets as default metricsets in uwsgi module. {pull}6688[6688]
- Mark kubernetes.event metricset as beta. {pull}[]
- Mark kubernetes.event metricset as beta. {pull}6715[6715]
- Set all metricsets as default metricsets in couchbase module. {pull}6683[6683]

*Packetbeat*

Expand Down
4 changes: 1 addition & 3 deletions metricbeat/docs/modules/couchbase.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This file is generated! See scripts/docs_collector.py
beta[]

This module periodically fetches metrics from https://www.couchbase.com/[Couchbase]
servers.
servers. The default metricsets are `bucket`, `cluster`, `node`.


[float]
Expand All @@ -21,8 +21,6 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: couchbase
metricsets: ["bucket", "cluster", "node"]
period: 10s
hosts: ["localhost:8091"]
----

Expand Down
1 change: 1 addition & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ metricbeat.modules:
metricsets: ["bucket", "cluster", "node"]
period: 10s
hosts: ["localhost:8091"]
enabled: true

#------------------------------- Docker Module -------------------------------
- module: docker
Expand Down
5 changes: 5 additions & 0 deletions metricbeat/module/couchbase/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- module: couchbase
metricsets: ["bucket", "cluster", "node"]
period: 10s
hosts: ["localhost:8091"]
enabled: true
2 changes: 0 additions & 2 deletions metricbeat/module/couchbase/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- module: couchbase
metricsets: ["bucket", "cluster", "node"]
period: 10s
hosts: ["localhost:8091"]
2 changes: 1 addition & 1 deletion metricbeat/module/couchbase/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This module periodically fetches metrics from https://www.couchbase.com/[Couchbase]
servers.
servers. The default metricsets are `bucket`, `cluster`, `node`.
7 changes: 4 additions & 3 deletions metricbeat/module/couchbase/bucket/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ var (
// 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("couchbase", "bucket", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("couchbase", "bucket", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

// MetricSet type defines all fields of the MetricSet
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/couchbase/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ var (
// 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("couchbase", "cluster", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("couchbase", "cluster", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

// MetricSet type defines all fields of the MetricSet
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/couchbase/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ var (
// 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("couchbase", "node", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("couchbase", "node", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

// MetricSet type defines all fields of the MetricSet
Expand Down
2 changes: 0 additions & 2 deletions metricbeat/modules.d/couchbase.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- module: couchbase
metricsets: ["bucket", "cluster", "node"]
period: 10s
hosts: ["localhost:8091"]

0 comments on commit 74b24d0

Please sign in to comment.