diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 28bfc50dfd15..b115e0f9cc8f 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -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* diff --git a/metricbeat/docs/modules/uwsgi.asciidoc b/metricbeat/docs/modules/uwsgi.asciidoc index b52a7626be13..cd4fa8a39187 100644 --- a/metricbeat/docs/modules/uwsgi.asciidoc +++ b/metricbeat/docs/modules/uwsgi.asciidoc @@ -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[] @@ -38,8 +39,6 @@ in <>. Here is an example configuration: ---- metricbeat.modules: - module: uwsgi - metricsets: ["status"] - period: 10s hosts: ["tcp://127.0.0.1:9191"] ---- diff --git a/metricbeat/metricbeat.reference.yml b/metricbeat/metricbeat.reference.yml index 22f5a8290970..dfc6e2f5a0ef 100644 --- a/metricbeat/metricbeat.reference.yml +++ b/metricbeat/metricbeat.reference.yml @@ -473,6 +473,7 @@ metricbeat.modules: #-------------------------------- uwsgi Module ------------------------------- - module: uwsgi metricsets: ["status"] + enable: true period: 10s hosts: ["tcp://127.0.0.1:9191"] diff --git a/metricbeat/module/uwsgi/_meta/config.reference.yml b/metricbeat/module/uwsgi/_meta/config.reference.yml new file mode 100644 index 000000000000..180ae4ab4330 --- /dev/null +++ b/metricbeat/module/uwsgi/_meta/config.reference.yml @@ -0,0 +1,5 @@ +- module: uwsgi + metricsets: ["status"] + enable: true + period: 10s + hosts: ["tcp://127.0.0.1:9191"] diff --git a/metricbeat/module/uwsgi/_meta/config.yml b/metricbeat/module/uwsgi/_meta/config.yml index 46dbc35d4b85..e16ad9be6d17 100644 --- a/metricbeat/module/uwsgi/_meta/config.yml +++ b/metricbeat/module/uwsgi/_meta/config.yml @@ -1,4 +1,2 @@ - module: uwsgi - metricsets: ["status"] - period: 10s hosts: ["tcp://127.0.0.1:9191"] diff --git a/metricbeat/module/uwsgi/_meta/docs.asciidoc b/metricbeat/module/uwsgi/_meta/docs.asciidoc index f4b66585a53c..af53032206ee 100644 --- a/metricbeat/module/uwsgi/_meta/docs.asciidoc +++ b/metricbeat/module/uwsgi/_meta/docs.asciidoc @@ -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[] diff --git a/metricbeat/module/uwsgi/status/status.go b/metricbeat/module/uwsgi/status/status.go index 9c5ed3dcef0d..a47e51ada596 100644 --- a/metricbeat/module/uwsgi/status/status.go +++ b/metricbeat/module/uwsgi/status/status.go @@ -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. diff --git a/metricbeat/modules.d/uwsgi.yml.disabled b/metricbeat/modules.d/uwsgi.yml.disabled index 46dbc35d4b85..e16ad9be6d17 100644 --- a/metricbeat/modules.d/uwsgi.yml.disabled +++ b/metricbeat/modules.d/uwsgi.yml.disabled @@ -1,4 +1,2 @@ - module: uwsgi - metricsets: ["status"] - period: 10s hosts: ["tcp://127.0.0.1:9191"]