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 default metricset for uwsgi module #6688

Merged
merged 1 commit into from
Mar 30, 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
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- Set `status` as default metricset in Apache module. {pull}6673[6673]
- 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]

*Packetbeat*

Expand Down
9 changes: 4 additions & 5 deletions metricbeat/docs/modules/uwsgi.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ experimental[]

== uwsgi module

This is the uwsgi module. Uses http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html[StatsServer].
This is the uwsgi module. By default collects the `stats` metricset, using
http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html[StatsServer].

[float]
=== Module-specific configuration notes

The uWSGI module has these additional config options:

*`hosts`*:: host URLs to get data from. by default `tcp://127.0.0.1:9191`.
*`hosts`*:: host URLs to get data from (e.g: `tcp://127.0.0.1:9191`).
Can obtain data from 3 types of schemes: tcp (tcp://ip:port), unix socket (unix:///tmp/uwsgi.sock)
and http/https server (http://ip:port)

[float]
=== Dashboard

The nginx module comes with a predefined dashboard. For example:
The uwsgi module comes with a predefined dashboard. For example:

image::./images/uwsgi_dashboard.png[]

Expand All @@ -38,8 +39,6 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: uwsgi
metricsets: ["status"]
period: 10s
hosts: ["tcp://127.0.0.1:9191"]
----

Expand Down
1 change: 1 addition & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ metricbeat.modules:
#-------------------------------- uwsgi Module -------------------------------
- module: uwsgi
metricsets: ["status"]
enable: true
period: 10s
hosts: ["tcp://127.0.0.1:9191"]

Expand Down
5 changes: 5 additions & 0 deletions metricbeat/module/uwsgi/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- module: uwsgi
metricsets: ["status"]
enable: true
period: 10s
hosts: ["tcp://127.0.0.1:9191"]
2 changes: 0 additions & 2 deletions metricbeat/module/uwsgi/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- module: uwsgi
metricsets: ["status"]
period: 10s
hosts: ["tcp://127.0.0.1:9191"]
7 changes: 4 additions & 3 deletions metricbeat/module/uwsgi/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
== uwsgi module

This is the uwsgi module. Uses http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html[StatsServer].
This is the uwsgi module. By default collects the `stats` metricset, using
http://uwsgi-docs.readthedocs.io/en/latest/StatsServer.html[StatsServer].

[float]
=== Module-specific configuration notes

The uWSGI module has these additional config options:

*`hosts`*:: host URLs to get data from. by default `tcp://127.0.0.1:9191`.
*`hosts`*:: host URLs to get data from (e.g: `tcp://127.0.0.1:9191`).
Can obtain data from 3 types of schemes: tcp (tcp://ip:port), unix socket (unix:///tmp/uwsgi.sock)
and http/https server (http://ip:port)

[float]
=== Dashboard

The nginx module comes with a predefined dashboard. For example:
The uwsgi module comes with a predefined dashboard. For example:

image::./images/uwsgi_dashboard.png[]
5 changes: 4 additions & 1 deletion metricbeat/module/uwsgi/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ import (
)

func init() {
mb.Registry.AddMetricSet("uwsgi", "status", New, uwsgi.HostParser)
mb.Registry.MustAddMetricSet("uwsgi", "status", New,
mb.WithHostParser(uwsgi.HostParser),
mb.DefaultMetricSet(),
)
}

// MetricSet for fetching uwsgi metrics from StatServer.
Expand Down
2 changes: 0 additions & 2 deletions metricbeat/modules.d/uwsgi.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- module: uwsgi
metricsets: ["status"]
period: 10s
hosts: ["tcp://127.0.0.1:9191"]