I’ve recently being doing some work to set up LibreNMS to monitor our vast swath of internal switches and systems. It’s a great tool, perhaps not as all encompassing as something like Zabbix or Nagios but it’s super easy to use, really presentable and does just want you want it to.
It also supports a great range of integrations and today I thought I’d have a look at integrating SmokePing with it to enable latency graphing and give a bit more function to the basics of ping response times.
I started off using the instructions over at Gattis but I’ll paraphrase them here.
# Install smokeping (Sendmail used to be required because of a smokeping bug but there's a # work around below)
sudo apt-get install smokeping
# Link in the smokeping apache config (apache2 was installed above as a req for smokeping)
sudo ln -s ../../smokeping/apache2.conf smokeping.conf
# Enable the config and mod_cgi
sudo a2enconf smokeping
sudo a2enmod cgid
#Reload the apache config
service apache2 reload
You then need to add a few switches or servers to the /etc/smokeping/config.d/Targets file so that Smokeping has something to do.
sudo vim /etc/smokeping/config.d/Targets
menu = My Company
title = My Company
menu = Web Server 1
title = Web Server 1
host = web.server.org
You need to edit the pathnames file so that the sendmail entry either points to your sendmail instance or to a valid file otherwise Smokeping won’t run.
sudo vim /etc/smokeping/config.d/pathnames
sendmail = /bin/false
Finally give Smokeping and Apache a quick restart
sudo service smokeping restart
sudo service apache2 reload
Now you can give it a go…
However you now might get an Service Unavailable error in your browser. This had me scratching my head for a bit but after some Googling it turns out that Smokeping uses FastCGI to make it, well, faster. So install FastCGI.
sudo apt-get install libapache2-mod-fcgid
You should now have a working Smokeping installation.