Observium Professional edition – Adding smokeping intergration
Updated 11/12/2014 – Added smokeping cgi link at bottom of post.
Update 12/1/2014 – Adjusted smokeping cgi link at bottom due to Mike Hammett’s feedback. Updated from restart to reload in cron job.
Update 3/7/2014 – Added FastCGI info, Apache 2.4 info
Lets get smokeping integration going.
apt-get install smokeping libapache2-mod-fcgid
We are going to have to make some changes to both apache2 and Observium.
//Smokeping $config['smokeping']['dir'] = "/var/lib/smokeping";
Observium has scripts which generate the config. Lets run it and see what it generates.
*** Targets *** probe = FPing menu = Top title = Network Latency Grapher remark = Welcome to Observium SmokePing + Observium menu = Observium ++ router host = router
Ok, so lets actually put the config in place.
php /opt/observium/scripts/generate-smokeping.php > /etc/smokeping/config.d/Targets /etc/init.d/smokeping reload
Let’s get Fast CGI going. Add this to /etc/smokeping/apache2.conf
<Location /smokeping/smokeping.cgi> SetHandler fcgid-script </Location>
Check back with Observium. Under the device, a little paper airplane between “Ports” and “Inventory” labeled “Ping” should show up. This tab will now be populated with graphs generated by the same rrd files for which smokeping generates it’s graphs with. The graphs look very different and I’m personally disappointed that they don’t match. Fortunately, you can still get to the smokeping interface by visiting:
Be aware – If this server is going to be on the internet, you may want to protect smokeping’s pages using an apache realm. There is no other password protection that I’m aware of. You can remove the file from /etc/apache2/config.d/smokeping if you want to disable this.
If you want to generate the smokeping config file you can add the command to cron, but don’t generate it to often as it can lead to gaps in recorded information. Also, if smokeping doesn’t finish in it’s allotted 300 seconds, it can cause gaps in graphs as well.
I wanted a direct link to the actual smokeping page so I’ve been modifying /opt/observium/html/pages/device/latency.inc.php and adding the following line
echo('<a href=/smokeping/smokeping.cgi?target=Observium.' . str_replace(".","_",$device['hostname']) . ' target="_blank">' . $device['hostname'] . ' on Smokeping<a>' );
echo('<table class="table table-striped">');