Integration with Graphite/Carbon¶
Graphite is a kick-ass realtime graphing application 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 one or more Carbon servers. It is compiled in by default as of uWSGI 1.0, though it can also be built as a plugin.
For the sake of illustration, let’s say your Carbon server is listening on
127.0.0.1:2003 and your uWSGI instance is on the machine
127.0.0.1:3031 with 4 processes. By adding the
option to your uWSGI instance you’ll instruct it to send its statistics to
the 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
hostname– machine’s hostname
id– 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: