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 all metricsets as default in etcd module #6756

Merged
merged 1 commit into from
Apr 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
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 @@ -188,7 +188,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"]