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 for HAProxy module #6758

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
4 changes: 2 additions & 2 deletions metricbeat/docs/modules/haproxy.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ required authentication add this to the haproxy config:
stats auth admin:admin
----

The default metricsets are `info`and `stat`.

[float]
=== Compatibility

Expand All @@ -54,8 +56,6 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: haproxy
metricsets: ["info", "stat"]
period: 10s
hosts: ["tcp://127.0.0.1:14567"]
----

Expand Down
1 change: 1 addition & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ metricbeat.modules:
metricsets: ["info", "stat"]
period: 10s
hosts: ["tcp://127.0.0.1:14567"]
enabled: true

#-------------------------------- HTTP Module --------------------------------
- module: http
Expand Down
5 changes: 5 additions & 0 deletions metricbeat/module/haproxy/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- module: haproxy
metricsets: ["info", "stat"]
period: 10s
hosts: ["tcp://127.0.0.1:14567"]
enabled: true
2 changes: 0 additions & 2 deletions metricbeat/module/haproxy/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- module: haproxy
metricsets: ["info", "stat"]
period: 10s
hosts: ["tcp://127.0.0.1:14567"]
2 changes: 2 additions & 0 deletions metricbeat/module/haproxy/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ required authentication add this to the haproxy config:
stats auth admin:admin
----

The default metricsets are `info`and `stat`.

[float]
=== Compatibility

Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/haproxy/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ var (

// init registers the haproxy info MetricSet.
func init() {
if err := mb.Registry.AddMetricSet("haproxy", "info", New, haproxy.HostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("haproxy", "info", New,
mb.WithHostParser(haproxy.HostParser),
mb.DefaultMetricSet(),
)
}

// MetricSet for haproxy info.
Expand Down
7 changes: 4 additions & 3 deletions metricbeat/module/haproxy/stat/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ var (

// init registers the haproxy stat MetricSet.
func init() {
if err := mb.Registry.AddMetricSet("haproxy", statsMethod, New, haproxy.HostParser); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("haproxy", statsMethod, New,
mb.WithHostParser(haproxy.HostParser),
mb.DefaultMetricSet(),
)
}

// MetricSet for haproxy stats.
Expand Down
2 changes: 0 additions & 2 deletions metricbeat/modules.d/haproxy.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- module: haproxy
metricsets: ["info", "stat"]
period: 10s
hosts: ["tcp://127.0.0.1:14567"]