Skip to content

uWSGI

Auto-Discovery
Health Check
Metrics
Logs

The agent gathers metrics using the uWSGI stats server, so you should enable it.

You can do so by adding the options --stats 127.0.0.1:1717 --memory-report to your server. Note that without --memory-report, the metric uwsgi_memory_used won’t be available.

By default, the agent assumes that the stats server is enabled on port 1717, if your server uses another port, you can change it in the configuration.

If some auto-detected parameters are wrong, you can manually override them by adding the following to /etc/glouton/conf.d/99-local.conf:

service:
[...]
# For a uWSGI running outside a container
- type: "uwsgi"
address: "127.0.0.1"
port: 8080
stats_port: 1717
# If your server uses the --stats-http option, you should set the protocol to "http".
# If the protocol is not set, "tcp" is used by default.
stats_protocol: "tcp"
# For an additional uWSGI running outside a container
- type: "uwsgi"
instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE"
address: "127.0.0.1"
port: 8080
stats_port: 1717
# For a uWSGI running in a Docker container
- type: "uwsgi"
instance: "CONTAINER_NAME"
port: 8080
stats_port: 1717

The following metrics are gathered:

MetricDescription
service_statusStatus of uWSGI
uwsgi_requestsNumber of requests per second
uwsgi_transmittedAmount of data transmitted in bits/s
uwsgi_memory_usedMemory used in bytes
uwsgi_avg_request_timeAverage time to process a request in seconds
uwsgi_exceptionsNumber of exceptions per second
uwsgi_harakiri_countNumber of worker timeout per second