Skip to content

Commit

Permalink
[Metricbeat] new uWSGI module (#6006)
Browse files Browse the repository at this point in the history
[new module] uWSGI metricbeat module
  • Loading branch information
iahmedov authored and exekias committed Jan 9, 2018
1 parent 697086b commit 8a3365f
Show file tree
Hide file tree
Showing 39 changed files with 1,617 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- Add a dashboard for the Nginx module. {pull}5991[5991]
- Add experimental mongodb/collstats metricset. {pull}5852[5852]
- Update the MySQL dashboard to use the Time Series Visual Builder. {pull}5996[5996]
- Add experimental uwsgi module. {pull}6006[6006]

*Packetbeat*

Expand Down
9 changes: 9 additions & 0 deletions metricbeat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ services:
- ./module/prometheus/_meta/env
- ./module/rabbitmq/_meta/env
- ./module/redis/_meta/env
- ./module/uwsgi/_meta/env
- ./module/zookeeper/_meta/env

# Modules
Expand Down Expand Up @@ -127,5 +128,13 @@ services:
redis:
build: ./module/redis/_meta

uwsgi_tcp:
build: ./module/uwsgi/_meta
command: uwsgi --http :8080 --master --processes 1 --threads 2 --stats 0.0.0.0:9191 --memory-report --wsgi-file app.py

uwsgi_http:
build: ./module/uwsgi/_meta
command: uwsgi --http :8080 --master --processes 1 --threads 2 --stats 0.0.0.0:9192 --memory-report --stats-http --wsgi-file app.py

zookeeper:
build: ./module/zookeeper/_meta
253 changes: 253 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ grouped in the following categories:
* <<exported-fields-rabbitmq>>
* <<exported-fields-redis>>
* <<exported-fields-system>>
* <<exported-fields-uwsgi>>
* <<exported-fields-vsphere>>
* <<exported-fields-windows>>
* <<exported-fields-zookeeper>>
Expand Down Expand Up @@ -11593,6 +11594,258 @@ format: duration
The OS uptime in milliseconds.
[[exported-fields-uwsgi]]
== uwsgi fields
uwsgi module
[float]
== uwsgi fields
[float]
== status fields
uwsgi.status metricset fields
[float]
=== `uwsgi.status.total.requests`
type: long
Total requests handled
[float]
=== `uwsgi.status.total.exceptions`
type: long
Total exceptions
[float]
=== `uwsgi.status.total.write_errors`
type: long
Total requests write errors
[float]
=== `uwsgi.status.total.read_errors`
type: long
Total read errors
[float]
=== `uwsgi.status.total.pid`
type: long
Process id
[float]
=== `uwsgi.status.worker.id`
type: long
Worker id
[float]
=== `uwsgi.status.worker.pid`
type: long
Worker process id
[float]
=== `uwsgi.status.worker.accepting`
type: long
State of worker, 1 if still accepting new requests otherwise 0
[float]
=== `uwsgi.status.worker.requests`
type: long
Number of requests served by this worker
[float]
=== `uwsgi.status.worker.delta_requests`
type: long
Number of requests served by this worker after worker is reloaded when reached MAX_REQUESTS
[float]
=== `uwsgi.status.worker.exceptions`
type: long
Exceptions raised
[float]
=== `uwsgi.status.worker.harakiri_count`
type: long
Dropped requests by timeout
[float]
=== `uwsgi.status.worker.signals`
type: long
Emitted signals count
[float]
=== `uwsgi.status.worker.signal_queue`
type: long
Number of signals waiting to be handled
[float]
=== `uwsgi.status.worker.status`
type: keyword
Worker status (cheap, pause, sig, busy, idle)
[float]
=== `uwsgi.status.worker.rss`
type: keyword
Resident Set Size. memory currently used by a process. if always zero try `--memory-report` option of uwsgi
[float]
=== `uwsgi.status.worker.vsz`
type: long
Virtual Set Size. memory size assigned to a process. if always zero try `--memory-report` option of uwsgi
[float]
=== `uwsgi.status.worker.running_time`
type: long
Process running time
[float]
=== `uwsgi.status.worker.respawn_count`
type: long
Respawn count
[float]
=== `uwsgi.status.worker.tx`
type: long
Transmitted size
[float]
=== `uwsgi.status.worker.avg_rt`
type: long
Average response time
[float]
=== `uwsgi.status.core.id`
type: long
worker ID
[float]
=== `uwsgi.status.core.worker_pid`
type: long
Parent worker PID
[float]
=== `uwsgi.status.core.requests.total`
type: long
Number of total requests served
[float]
=== `uwsgi.status.core.requests.static`
type: long
Number of static file serves
[float]
=== `uwsgi.status.core.requests.routed`
type: long
Routed requests
[float]
=== `uwsgi.status.core.requests.offloaded`
type: long
Offloaded requests
[float]
=== `uwsgi.status.core.write_errors`
type: long
Number of failed writes
[float]
=== `uwsgi.status.core.read_errors`
type: long
Number of failed reads
[[exported-fields-vsphere]]
== vSphere fields
Expand Down
Binary file added metricbeat/docs/images/uwsgi_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions metricbeat/docs/modules/uwsgi.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-module-uwsgi]]
== uwsgi module

experimental[]

== uwsgi module

This is the uwsgi module. Uses 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`.
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:

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


[float]
=== Example configuration

The uwsgi module supports the standard configuration options that are described
in <<configuration-metricbeat>>. Here is an example configuration:

[source,yaml]
----
metricbeat.modules:
- module: uwsgi
metricsets: ["status"]
period: 10s
hosts: ["tcp://127.0.0.1:9191"]
----

[float]
=== Metricsets

The following metricsets are available:

* <<metricbeat-metricset-uwsgi-status,status>>

include::uwsgi/status.asciidoc[]

23 changes: 23 additions & 0 deletions metricbeat/docs/modules/uwsgi/status.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-metricset-uwsgi-status]]
=== uwsgi status metricset

experimental[]

include::../../../module/uwsgi/status/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-uwsgi,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/uwsgi/status/_meta/data.json[]
----
3 changes: 3 additions & 0 deletions metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ This file is generated! See scripts/docs_collector.py
|<<metricbeat-metricset-system-raid,raid>> experimental[]
|<<metricbeat-metricset-system-socket,socket>> beta[]
|<<metricbeat-metricset-system-uptime,uptime>>
|<<metricbeat-module-uwsgi,uwsgi>> experimental[] |
.1+| |<<metricbeat-metricset-uwsgi-status,status>> experimental[]
|<<metricbeat-module-vsphere,vSphere>> beta[] |
.3+| |<<metricbeat-metricset-vsphere-datastore,datastore>> beta[]
|<<metricbeat-metricset-vsphere-host,host>> beta[]
Expand Down Expand Up @@ -151,6 +153,7 @@ include::modules/prometheus.asciidoc[]
include::modules/rabbitmq.asciidoc[]
include::modules/redis.asciidoc[]
include::modules/system.asciidoc[]
include::modules/uwsgi.asciidoc[]
include::modules/vsphere.asciidoc[]
include::modules/windows.asciidoc[]
include::modules/zookeeper.asciidoc[]
Loading

0 comments on commit 8a3365f

Please sign in to comment.