Graphite / Graphite-Web and Ubuntu 18.04 with nginx

Hi there,

to be honest I am a complete noob to all this fance python-etc-stuff…
And although having years of experience with webservers and modules and icinga, nagios, netsaint I am really struggeling with graphite under ubuntu with nginx…

Has anybody experience / a good howto about this?
Everything I found was with apache but not nginx (which seems to make a real difference for graphite-web…) or important details are completely missing…or…or…or…

  • What I got running: seems to be service data send to graphite / carbon backend, I see databases growing and named after services…
  • What I got not running: graphite-web module accessible through nginx (and therefor not showing in icingaweb2)…

Any help / recommendations?

Thanks a lot,

I have implemented the graphite module on Ubuntu and RH, and found that there was an issue with the nginx frontend forwarding and reading, so in the end I run the graphite-web as a standalone systemd unit and connected directly to it ( as it is an internal system we did not had the need for the extra layer of the nginx/ apache requirement)

Can you share your nginx and graphite module config ?

Interesting, can you share this configuration? :slight_smile:


We’re discussing graphite’s web portal itself, not the icingaweb modules, right?

The trickiest part is getting Gunicorn up and running if you don’t have experience running Django apps.

Similarly to Assaf, I point icingaweb’s graphite module directly at Gunicorn instead of Nginx (typically ipaddress:8000) and that works fine. For Graphite’s web portal specifically, you’ll need to make sure you forward the static content (described in that documentation) with Nginx. Here’s my systemd module:

Description = Graphite

User = carbon
Group = carbon
WorkingDirectory = /opt/graphite/webapp
PIDFile = /var/run/graphite/
ExecStart = /usr/local/bin/python3.7 /usr/local/bin/gunicorn --bind graphite_wsgi:application
ExecReload = /bin/kill -s HUP $MAINPID
ExecStop = /bin/kill -s TERM $MAINPID

WantedBy =

Naturally change paths accordingly. I install Graphite with pip and I’m not familiar with how Ubuntu lays it out (if at all). Your graphite_wsgi file should be in the webapp directory that parents graphite-web’s folder. That mess should summarize some headache I dealt with outside of the official documentation, let me know if you need anything clarified.

Additionally, check the file. That’s a standard thing with Django and if you need to configure any custom URIs before setting up a reverse proxy (URL_PREFIX=/graphite for example), that can be handled there.

Thanks for sharing this config, unfortunately I didn’t get it run with Ubuntu 18.04 though.
There are always issues by getting the provided graphite.wsgi running (some Python errors…).

But I found
which pointed me to a wonderful docker image which runs perfectly and provides me all necessary daemons I could just put into icinga2 / icingaweb2 modules configs.