1

installation

apt-get install munin
apt-get install spawn-fcgi
spawn-fcgi -s /var/run/munin/fcgi-graph.sock -U www-data -u munin -g munin /usr/lib/munin/cgi/munin-cgi-graph

nginx

server {
    listen  80;
    server_name  munin.dynaccount.com;

    root  /var/cache/munin/www;

    location / {
        try_files  $uri $uri/ =404;
    }

    location ^~ /munin-cgi/munin-cgi-graph/ {
        fastcgi_split_path_info  ^(/munin-cgi/munin-cgi-graph)(.*);
        fastcgi_param PATH_INFO  $fastcgi_path_info;
        fastcgi_pass  unix:/var/run/munin/fcgi-graph.sock;
        include  fastcgi_params;
    }
}

When I click on a graph the following error in the browser is returned

502 Bad gateway

http://munin.domain/munin-cgi/munin-cgi-graph/localdomain/localhost.localdomain/exim_mailqueue-pinpoint=1492758910,1492866910.png?&lower_limit=&upper_limit=&size_x=800&size_y=400
clarkk
  • 27,151
  • 72
  • 200
  • 340

1 Answers1

4

I've had the same problem on my ubuntu server. I tried this https://serverfault.com/a/713408 but nothing happens, then I deleted

/var/run/munin/fcgi-graph.sock

and run again:

spawn-fcgi -s /var/run/munin/fcgi-graph.sock -U www-data -u www-data -g www-data /usr/lib/munin/cgi/munin-cgi-graph

after that everything is working fine.

boxeus
  • 384
  • 2
  • 6
  • 13