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

[Metricbeat] new uWSGI module #6006

Merged
merged 6 commits into from
Jan 9, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
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 @@ -11401,6 +11402,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`

type: long

Number of requests served


[float]
=== `uwsgi.status.core.static_requests`

type: long

Number of static file serves


[float]
=== `uwsgi.status.core.routed_requests`

type: long

Routed requests


[float]
=== `uwsgi.status.core.offloaded_requests`

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.
57 changes: 57 additions & 0 deletions metricbeat/docs/modules/uwsgi.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
////
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"]
enabled: false
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 @@ -110,6 +110,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 @@ -150,6 +152,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[]
2 changes: 2 additions & 0 deletions metricbeat/include/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ import (
_ "github.com/elastic/beats/metricbeat/module/system/raid"
_ "github.com/elastic/beats/metricbeat/module/system/socket"
_ "github.com/elastic/beats/metricbeat/module/system/uptime"
_ "github.com/elastic/beats/metricbeat/module/uwsgi"
_ "github.com/elastic/beats/metricbeat/module/uwsgi/status"
_ "github.com/elastic/beats/metricbeat/module/vsphere"
_ "github.com/elastic/beats/metricbeat/module/vsphere/datastore"
_ "github.com/elastic/beats/metricbeat/module/vsphere/host"
Expand Down
Loading