Smokeping Installation on Ubuntu 14.04 LTS/16.04 LTS



Step-by-Step guide to installing Smokeping on Ubuntu 14.04 LTS/16.04 LTS 

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

Now, configure targets file to monitor different servers. You can do this by editing targets file located at /etc/smokeping/config.d/Targets.

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

Login:

Phase 1: Creating the password file.

sudo mkdir /etc/apache2/passwd

sudo htpasswd -c /etc/apache2/passwd/passwords username

The -c is used to create a new user. This parameter can be omitted to change the password of an existing user.

Phase 2: Modifying Smokeping Directives

sudo vi /etc/apache2/conf-enabled/smokeping.conf

### Modify the following directives as necessary ###

<Directory "/usr/share/smokeping/www">

Options FollowSymLinks

AuthType Basic

AuthName "Smokeping"

AuthBasicProvider file

AuthUserFile /etc/apache2/passwd/passwords

Require valid-user

</Directory>

Phase 3: Restarting Apache Web Server

This is the easiest step

sudo /etc/init.d/apache2 restart


Smokeping Installation on Ubuntu 14.04 LTS/16.04 LTS Smokeping Installation on Ubuntu 14.04 LTS/16.04 LTS Reviewed by RIO IT on 12:14 Rating: 5
Powered by Blogger.