Smokeping on Ubuntu Saucy

Nov 26, 2013   #saucy  #nginx  #fcgiwrap  #ubuntu 

For anyone attempting to run smokeping with nginx and fcgiwrap, there is a major bug in the package that ubuntu/debian provides.

Install smokeping

apt-get --no-install-recommends install smokeping

Install fcgiwrap

apt-get install fcgiwrap

In your nginx site config, add the cgi configuration for fcgiwrap

/etc/nginx/sites-enabled/yoursite:

location ~ \.cgi$ {
    fastcgi_intercept_errors  on;
    include                   fastcgi_params;
    fastcgi_pass              unix:/var/run/fcgiwrap.socket;
    fastcgi_param             SCRIPT_NAME           $fastcgi_script_name;
    fastcgi_param             SCRIPT_FILENAME       $document_root$fastcgi_script_name;}

In your nginx site config, add a smokeping location (I also use authentication here)

/etc/nginx/sites-enabled/yoursite:

location /smokeping {
    gzip                  off;
    index                 smokeping.cgi;
}

ln -s /usr/share/smokeping/www /usr/share/nginx/html/smokeping

ln -s /usr/lib/cgi-bin/smokeping.cgi /usr/share/nginx/html/smokeping/

Edit the config files in /etc/smokeping/config.d to your liking

Good luck!