Skip to content

Commit

Permalink
Set all metricsets as default in etcd module (#6756)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruflin authored and jsoriano committed Apr 4, 2018
1 parent e48e4ef commit b5dc679
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 21 deletions.
5 changes: 1 addition & 4 deletions metricbeat/docs/modules/etcd.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ beta[]

This is the Etcd Module. The Etcd module uses https://coreos.com/etcd/docs/latest/v2/api.html [Etcd v2 API] to collect metrics.


The default metricsets are `leader`, `self` and `store`.


[float]
Expand All @@ -22,10 +22,7 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: etcd
metricsets: ["leader", "self", "store"]
period: 10s
hosts: ["localhost:2379"]
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
Expand Down
1 change: 0 additions & 1 deletion metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ metricbeat.modules:
period: 10s
hosts: ["localhost:2379"]


#------------------------------- Golang Module -------------------------------
- module: golang
metricsets: ["expvar","heap"]
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/module/etcd/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- module: etcd
metricsets: ["leader", "self", "store"]
period: 10s
hosts: ["localhost:2379"]
3 changes: 0 additions & 3 deletions metricbeat/module/etcd/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
- module: etcd
metricsets: ["leader", "self", "store"]
period: 10s
hosts: ["localhost:2379"]

2 changes: 1 addition & 1 deletion metricbeat/module/etcd/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This is the Etcd Module. The Etcd module uses https://coreos.com/etcd/docs/latest/v2/api.html [Etcd v2 API] to collect metrics.


The default metricsets are `leader`, `self` and `store`.
7 changes: 4 additions & 3 deletions metricbeat/module/etcd/leader/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

func init() {
if err := mb.Registry.AddMetricSet("etcd", "leader", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("etcd", "leader", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

type MetricSet struct {
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/etcd/self/self.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

func init() {
if err := mb.Registry.AddMetricSet("etcd", "self", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("etcd", "self", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

type MetricSet struct {
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/etcd/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ var (
)

func init() {
if err := mb.Registry.AddMetricSet("etcd", "store", New, hostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("etcd", "store", New,
mb.WithHostParser(hostParser),
mb.DefaultMetricSet(),
)
}

type MetricSet struct {
Expand Down
3 changes: 0 additions & 3 deletions metricbeat/modules.d/etcd.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
- module: etcd
metricsets: ["leader", "self", "store"]
period: 10s
hosts: ["localhost:2379"]

0 comments on commit b5dc679

Please sign in to comment.