Integration with Graphite/Carbon
Graphite is a kick-ass realtime graphingapplication built on top of three components:
- Whisper – a data storage system
- Carbon – a server for receiving data
- Python web application for graph rendering and management.
The uWSGI Carbon plugin allows you to send uWSGI’s internal statistics to oneor more Carbon servers. It is compiled in by default as of uWSGI 1.0, thoughit can also be built as a plugin.
Quickstart
For the sake of illustration, let’s say your Carbon server is listening on127.0.0.1:2003
and your uWSGI instance is on the machine debian32
,listening on 127.0.0.1:3031
with 4 processes. By adding the —carbon
option to your uWSGI instance you’ll instruct it to send its statistics tothe Carbon server periodically. The default period is 60 seconds.
- uwsgi --socket 127.0.0.1:3031 --carbon 127.0.0.1:2003 --processes 4
Metrics are named like uwsgi.<hostname>.<id>.requests
anduwsgi.<hostname>.<id>.worker<n>.requests
, where:
hostname
– machine’s hostnameid
– name of the first uWSGI socket (with dots replaced by underscores)n
– number of the worker processes (1-based).
Examples of names of Carbon metrics generated by uWSGI:
uwsgi.debian32.127_0_0_1:3031.requests
(uwsgi.<hostname>.<id>.requests
)uwsgi.debian32.127_0_0_1:3031.worker1.requests
(uwsgi.<hostname>.<id>.worker<n>.requests
)uwsgi.debian32.127_0_0_1:3031.worker2.requests
(uwsgi.<hostname>.<id>.worker<n>.requests
)uwsgi.debian32.127_0_0_1:3031.worker3.requests
(uwsgi.<hostname>.<id>.worker<n>.requests
)uwsgi.debian32.127_0_0_1:3031.worker4.requests
(uwsgi.<hostname>.<id>.worker<n>.requests
).
See also