Monday, November 7, 2016

Configure smokeping on Ubuntu 16

This is actually not Ubuntu 16 specific, but i need to write it down because i tend to forget this.

Comment the sendmail line in “/etc/smokeping/config.d/pathnames”:

#sendmail = /usr/sbin/sendmail

Set the cgiurl line in “/etc/smokeping/config.d/General”:

cgiurl = http://YOURIPADDRESS/cgi-bin/smokeping.cgi

Add the stuff to “/etc/apache2/conf-available/serve-cgi-bin.conf” so it looks like:

<IfModule mod_alias.c>
        <IfModule mod_cgi.c>
                Define ENABLE_USR_LIB_CGI_BIN

        <IfModule mod_cgid.c>
                Define ENABLE_USR_LIB_CGI_BIN

        <IfDefine ENABLE_USR_LIB_CGI_BIN>
                ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
                <Directory "/usr/lib/cgi-bin">
                        AllowOverride None
                        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                        Require all granted
                Alias /smokeping /usr/share/smokeping/www
                <Directory “/usr/share/smokeping/www”>
                        Options FollowSymLinks

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Enable CGI:

sudo a2enmod cgi

Restart apache and smokeping:

sudo service apache2 restart
sudo service smokeping restart