Skip to content

Commit

Permalink
Set default metricset for uwsgi module
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Mar 29, 2018
1 parent 1a25bea commit 77fdb25
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 13 deletions.
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"]

0 comments on commit 77fdb25

Please sign in to comment.