Configuration of Prometheus uWSGI Expoter

Configuration of Prometheus uWSGI Expoter


uWSGI_expoter is a Prometheus exporter. I made for work with uWSGI in eperor mode, than a server with multiples application, Django or Wordpress. It can also monitor a single web application.


  • Prometheus suite working: Prometheus, AlarmManger, Tutorial
  • uWsgi istance, with monitoring socket enabled, Tutorial


User for exporter

Create a new user for exporter, i call prometheus.

sudo adduser prometheus --system \
                   --no-create-home \
                   --shell /sbin/nologin

Dowload and install binary

Dowload last binary version from:, and unzip it. This guide is made for version 1.0

tar -xf uWSGI_Exporter.tar.xz
mv -v uWSGI_Exporter /opt/

Install service with Systemd

Install Systemd unit:

# pwd: /opt/uWSGI_Exporter

mv -v uwsgi_expoter.service /etc/systemd/system/
systemctl daemon-reload


port: 9238
socket_dir: "/run/uwsgi/stats/"
pidfile: "/run/"

- domain:
  socket: your_socket_name.sock

- domain:
  socket: other_socket_domain.sock

Socket_dir: Folder where search uwsgi statistcs soket socket

pidfile: PID of service

stats_sockets: List for socket and related domain

  • domain: String of monitored, domain; This is a simple string is not necessary real domain of service.
  • socket: Path of related socket.

Start service with:

systemctl start uwsgi_expoter

If there a firewall on your server remeber open associated port.

Then configure Prometheus by adding exporter.

If you use Grafana for make graph, there a premade bashboard, dowload it from: