Installing Smokeping on Ubuntu used to be a total breeze. Since 14.04 however, it’s been a bit of a mission.

This guide assumes a fresh out of the box Ubuntu install. I’m using the 64bit Server variety, but this should work on any 14.04 system.

UPDATE - It also works perfectly on Ubuntu 16.04 LTS Server :~)

Note - I am a noob with Apache and a relative noob with Linux, but even I got it to work fairly painlessly.

Step 1: install smokeping (aaand you’re done).
 sudo apt-get install smokeping -y

Step 2:  normally, you’d be done by now.. But things have changed.
 sudo nano /etc/smokeping/config.d/pathnames

You’re going to want to go into the pathnames file and comment out the line about mail. Setting up mail to work with smokeping is outside the scope of this post. Because I’m lazy.

Do this: _#sendmail = /usr/sbin/sendmail
_ Then hit CTRL-O, Enter, CTRL-X. That’s how you save a file in Nano, I won’t stick that bit in again.

Step 3: If you made it this far, you’re going to be fine. Start ‘er up…
sudo service smokeping start

Step 4: Head over to a web browser and enter the IP of your server/cgi-bin/smokeping.cgi
(Hint: it will fail, giving you a 404 error).
(Hint 2: you can find the IP address of your server by entering ifconfig, it’s typically eth0)

Step 5: It’s not working because you’re missing a couple of things. One is a slight config change in a smokeping config file,  one is some missing symlinks.. the other is (likely) the cgi module for Apache2 isn’t enabled. Fix it!

sudo nano /etc/smokeping/config.d/General

Edit the line that has cgiurl in it to read like:
_cgiurl = http://10.10.10.10/cgi-bin/smokeping.cgi
_

Save and quit nano.

Next you want to edit the following Apache config file:
sudo nano /etc/apache2/conf-available/serve-cgi-bin.conf

Under the lines

“Require all granted
     </Directory>”

You want to add:

ScriptAlias /smokeping/smokeping.cgi /usr/lib/cgi-bin/smokeping.cgi
 Alias /smokeping /usr/share/smokeping/www
 <Directory “/usr/share/smokeping/www”>
 Options FollowSymLinks
 </Directory>

(Save and quit editing the file)

Finally, enable CGI:
sudo a2enmod cgi

Step 6: Kind of threw 3 things into step 5 there, whoops. Anyway now you want to restart smokeping and apache, just to see if you broke anything:
sudo service apache2 restart
sudo service smokeping restart

Now head back to your browser, throw in 10.10.10.10/cgi-bin/smokeping.cgi

It should work… If not, drop me a line.