Smokeping integration into Cacti

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
amanville
Posts: 1
Joined: Wed Nov 27, 2013 10:59 am

Smokeping integration into Cacti

Post by amanville »

Hello,

I really need some help about smokeping integration into cacti using the nmid smokeping plugin.

I ckecked the different issues known on the forum but didn't find any help for my case.

I followed the plugin installation and eveything seems correct excepted that I do not have any Smokeping Graph or link in my cacti grah view.

My cacti version : Version 0.8.8b

I can choose add to smokeping when selecting a device :D
The smokeping_nmid_spserver1_config.txt (target section to add into smokeping config file) file is created in the temp directory :D

However I think it is not normal that there is no host in the smokeping_nmid_spserver1_config.txt file but only menu and title ? :cry:

I checked the cacti database and for the host added to smokeping, there is no nwmgmt_smokeping_path whereas it has been configured in the NMID setting (see attached file).

nwmgmt_settings: s1000000000
nwmgmt_smokeping_path:
nwmgmt_smokeping_server: http://dsi-smokeping-1
nwmgmt_smokeping_probe:
1 row in set (0.00 sec)


Please help !!!!
Attachments
nmid config.JPG
nmid config.JPG (82.46 KiB) Viewed 10561 times
User avatar
winni
Posts: 24
Joined: Wed Aug 22, 2012 6:35 am
Location: Germany
Contact:

Re: Smokeping integration into Cacti

Post by winni »

Hi,

The following is taken from a checklist that I wrote for installing Cacti from scratch on Ubuntu 12.04 LTS servers. These are just notes for myself, without comments or descriptive details.

These instructions assume that Smokeping is installed on the same machine as Cacti.

There are probably better and more secure ways to do this, and someone should properly document them.

Code: Select all

Installing Smokeping.

sudo mkdir /var/nmid
sudo chmod –R a+wr /var/nmid
sudo apt-get install fping
sudo apt-get install echoping
sudo apt-get install sendmail
sudo apt-get install smokeping
sudo apt-get install libsoap-lite-perl
sudo chmod –R a+wr /usr/share/smokeping
sudo chmod -R a+wr /var/lib/smokeping

The URL http://<yoursmokepingserver>/cgi-bin/smokeping.cgi should now show you the smokeping website.

Install NMID plugin:

cd /var/www/plugins   #This should be your Cacti's plugin directory

wget http://blog.network-outsourcing.de/wp-content/uploads/nmidSmokeping.zip

unzip nmidSmokeping.zip
rm nmidSmokeping.zip

Install and activate the plugin in Cacti's "Plugin Management".

IMPORTANT: Make sure that your user account has access permission to this plugin! Check Cacti's "User Management"!

Copy the following to a file named
/etc/cron.d/nmid:

*/5 * * * * root /etc/smokeping/nmid

Copy the following to a file named /etc/cron.d/smokeping:

*/5 * * * * root /etc/smokeping/smokecron

Copy the following to a file named /etc/smokeping/nmid:

#!/bin/sh
cat /etc/smokeping/config_header > /etc/smokeping/config.d/Targets
cat /var/nmid/smokeping_nmid_spserver1_config.txt >> /etc/smokeping/config.d/Targets
/etc/init.d/smokeping reload > /dev/null 2>&1

Make it executable via "sudo chmod +x /etc/smokeping/nmid".

Copy the following to a file named /etc/smokeping/smokecron:

#!/bin/sh
logfile=/var/log/smokeping
# Make sure that Smokeping is running.
if [ $(ps -A | grep -c smokeping) = 0 ];
then
echo .$(date) Smokeping revived. >> $logfile
/etc/init.d/smokeping restart > /dev/null 2>&1
fi	

Copy the following to a file named
/etc/smokeping/config_header:

*** Targets ***
probe = FPing

menu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website. \
Here you will learn all about the latency of our network.

+ Internet_Reference

menu = Internet Reference
title = Internet Reference

++ GOOGLE

menu = GOOGLE
title = GOOGLE - 8.8.8.8
host = 8.8.8.8

You should at least restart the CRON daemon after these changes.

Every device that is supposed to appear in Smokeping must be added to Smokeping in Cacti via "Management/Devices/Add to Smokeping...".

The CRON script "nmid" should ensure that Smokeping's configuration is automatically updated every five minutes. If it doesn't appear there automatically (which unfortunately tends to happen on some Ubuntu servers), launch the "nmid" script manually.

If anybody has suggestions for improvements, I --REALLY-- would love to hear them.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Smokeping integration into Cacti

Post by phalek »

One addon, the latest version is v1.13 and fixes some issues with different smokeping installs:

http://blog.network-outsourcing.de/prod ... smokeping/
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests