Installing Smokeping on CentOS 5.5

In this CentOS 5.5 tutorial we will be installing Smokeping and SmokeTrace on a CentOS 5.5 i386 server. The assumption is that you have a basic to medium understanding of Apache but if you follow this tutorial you should be able to complete the task successfully.

A bit on the software that we’ll be using:

SmokePing keeps track of your network latency:

* Best of breed latency visualisation.
* Interactive graph explorer.
* Wide range of latency measurment plugins.
* Master/Slave System for distributed measurement.
* Highly configurable alerting system.
* Live Latency Charts with the most ‘interesting’ graphs.
* Free and OpenSource Software written in Perl written by Tobi Oetiker, the creator of MRTG and RRDtool

Preliminary Note:
I am using a CentOS 5.5 i386 base installation in this tutorial.

* (IP CentOS 5.5 i386 base installation

Lets begin by installing the framework required by Smokeping.


Replace this:

With This:

or you can Patch the file:

Replace this:

With this:

or you can Patch the file:

Change this:

To this:

or you can Patch the file:

change > #AddHandler cgi-script .cgi
to > AddHandler cgi-script .cgi

Under <Directory “/var/www/html”>

change > Options Indexes FollowSymLinks
to > Options Indexes FollowSymLinks ExecCGI

Change this:

To this:

or you can Patch the file:

Change this:

To this:

Lets create a basic Config file for Smokeping to get started:

Lets create a service startup script for Smokeping

Finally lets add Apache and Smokeping to startup and get them started:

Now browse to your new installed Smokeping and Smoketrace installation

  • Search Engine Optimization

    Sjoe! quite a monster of a tutorial there! Good one man ūüôā Thanks for the effort!

  • FRLinux

    Nice article, just a note for 64bits systems, use this instead: use lib qw(/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/RRDs);

  • Nnyan

    Loved this Howto but when I get to the very end and browse to my website it just lists the smokeping.cgi file like a text file

  • Anonymous

    The only suggestion I can make is to double check you Apache config and make sure the following has been done:

    vi /etc/httpd/conf/httpd.conf

    change > #AddHandler cgi-script.cgi
    to > AddHandler cgi-script.cgi


    change > Options Indexes FollowSymLinks
    to > Options Indexes FollowSymLinks ExecCGI

  • Nnyan

    Thanks for the reply! I found I made a copy-paste error and got that fixed. I did not have a /smokeping/var directory (just created one) and finally I got this error:

    ERROR: /opt/smokeping/etc/config, line 111: File ‘/opt/smokeping/etc/smokeping_secrets.dist’ is world-readable or writable, refusing it

    so I just chmod’d that file and it’s up and running! this is awesome! Any chance of getting this into a script?

  • Nnyan

    latest error when i clicked on the “targets” link:

    Software error:

    Can’t call method “_pings” on an undefined value at /opt/smokeping/lib/ line 837.
    For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

  • Wale

    Love this it worked like charm. Keep up the good work can we have something on request tracker

  • Akuler85

    why when i completed follow your step, i couldn’t browse the page..
    it shows—> Error 404 – Page Not Found

    Sorry, what you are looking for isn’t here.

  • Anonymous

    There are quiet a few things that could have gone wrong.

    Please check the following:

    1) Is Apache running?
    2) What errors do you get in the Apache error logs?
    3) Check to see you’re using your FQDN and not How2CentOS?

  • Akuler85

    hi.. i dont know how to check, i’m still new for this linux command and open source software, please guide me. Thanks ūüôā

  • Anonymous

    If you’re still new to Linux then this is probably one of the most difficult installations you can do.

    Short of allowing us access to your server I am afraid assisting you could be a lengthy process.

    If you do require help then we can assist for a small donation. Please use the contact us page should you want our help.

  • Houckham

    Excellent guide !!!

  • Houckham

    I now have a very odd problem. My first two targets are working great (and still working) I have added another three targets since and they are not populating any data. There graphs are present but no lines.

  • Anonymous

    Very strange behavior. Are you able to ping them from the command prompt? Maybe a firewall.

  • Houckham

    Yes, very strange! …A couple of reboots os the server later and all is good again, the new graphs are populated with data. :-S

    I performed another test by adding one more target and same happened again.

    What actions should be taken after adding targets? I am not sure if maybe a particular service needs to be restarted?

  • Houckham

    OK. I restarted Smokeping service and httpd service and nothing changed. Still no data in the graphs after 3 hours.

    I then rebooted the server, and it started working. Therefore there must be a service which needs to be restarted I guess – do you know which one?

  • Cue

    Yo mate , have a question . Do you have any guide/addendum running this with seLinux enabled ? Your guide works perfectly with seLinux off , but my installs just wont have any of it when it’s switched on . Always really wanted to learn selinux properly , but i just find it hopelesly overcomplicated any time i try and use it.

  • NoYourName

    great how to. I used this as an outline on a 64bit install of CentOS with the newest version of Smokeping. I don’t know if this is true with the version you used in the how to, but the path at the top of tr.cgi had to be changed to match smokeping.cgi. Thanks for the great writeup.

  • Nirav

    i follow the docs, and when i try to open page opens and when i pass host address i don’t see anything on screen… i even don’t see any log under /var no data under /data

    Am i missing anything here?

  • wingZero


    I am getting the following error for this, any ideas on how to sort this?



    [Mon Feb 14 14:13:02 2011] smokeping.cgi: object version 1.04 does not match $::VERSION %_ at /usr/lib/perl5/ line 18.
    [Mon Feb 14 14:13:02 2011] smokeping.cgi: Compilation failed in require at /usr/lib/perl5/Digest/ line 23.
    [Mon Feb 14 14:13:02 2011] smokeping.cgi: Compilation failed in require at /local/ec2user/smokeping-2.4.2/lib/ line 8.
    [Mon Feb 14 14:13:02 2011] smokeping.cgi: BEGIN failed–compilation aborted at /local/ec2user/smokeping-2.4.2/lib/ line 8.
    [Mon Feb 14 14:13:02 2011] smokeping.cgi: Compilation failed in require at ./smokeping.cgi line 7.
    [Mon Feb 14 14:13:02 2011] smokeping.cgi: BEGIN failed–compilation aborted at ./smokeping.cgi line 7.

  • IT2GO

    Thank you for sharing this howto! I tried to install it like it’s said here…but…i’ve failed ūüôā

    – I got the traceroute page, but i don’t see smokes
    – I’ve added 2 more hosts, i’ve restart smokeping…and they don’t load the RRD
    – Traceroute isn’t working at all

    I’ve tried what i could, but i can’t make it working. Can please someone help me with this issue? If possible, mail me at kdr (a) kdr (.) ms

    Thank you!

  • Shivneet

    Hi smokeping service doesn”t start..any idea what could be wrong

    [root@smokeping htdocs]# service smokeping start
    Starting Smokeping: [ OK ]
    [root@smokeping htdocs]# service httpd start
    Starting httpd: [ OK ]
    [root@smokeping htdocs]# service smokeping status
    Smokeping is stopped
    [root@smokeping htdocs]#

  • Bighorn

    same with me….after issue cmd “service smokeping start” it says OK but after check status it says stopped….my graph has no populated data on it….pls help

  • Gospodinov

    Same here everything went smoothly but smokeping service does not start. It shows OK when i start it but when issue service smokeping status it says stopped…

  • Sonud12

    we get output as No data found for smokeping smokeping.cgi-Mozilla Firefox.PLZ suggest solution for this soon.

  • Anonymous

    Have you guys tried starting it with it’s binary file ?

    # /opt/smokeping/bin/smokeping

  • Gilbert

    try changing line 39 of the init script to

    status /var/lock/subsys/smokeping

  • blahblahblah789

    Yeah run the /opt/smokeping/bin/smokeping by hand.. When I did that I learned that I needed to install the module. I did a yum install perl-rrdtools

    I then reran smokeping and it worked for me so far.

  • Houckham

    Hello I found a fix – I added the extra detail to kill the speedy_backend in my service management script: /etc/init.d/smokeping


    # Stop the service Smokepingstop() {¬†¬†¬†¬†¬†¬†¬† echo -n “Stopping Smokeping: ”¬†¬†¬†¬†¬†¬†¬† kill -9 ps ax | grep "/opt/smokeping/bin/smokeping" | grep -v grep | awk '{ print $1 }' >/dev/null 2>&1 && killall speedy_backend¬†¬†¬†¬†¬†¬†¬† ### Now, delete the lock file ###¬†¬†¬†¬†¬†¬†¬† rm -f /var/lock/subsys/smokeping¬†¬†¬†¬†¬†¬†¬† success $”Smokeping shutdown”¬†¬†¬†¬†¬†¬†¬† echo}
    ~~end snip~~

  • Houckham

    good fix ! 

  • Anonymous

     Thanks for the update! I have added your suggestion to the tutorial!

  • Herrmc

    ¬†I used cut and paste from the tutorial and had the same problem as several post here (where: service smokeping status) showed “Smokeping is stopped”.
    ¬† I edited the line to add the path as above… but failed to notice that in the tutorial text that the “S” in “Smokeping” is capitalized…. changed it to lower case and all is well with the service smokeping status

  • Herrmc

    ¬†I have completed the install per the tutorial, and gone over it a few times… worked out some kinks from typos and missed lines.

    ¬† Now I am getting this error on the webpage when I click the “Targets” link on the main page. I will keep looking for my typo or missed step, but was hoping someone could help on this one.

  • Herrmc

    Ouch… forgot to include the error…. sorry~

    Software error:
    Can’t call method “_pings” on an undefined value at /opt/smokeping/lib/ line 837


    set the permission
    chmod 700 /opt/smokeping/bin/smokeping

  • Rado3105

    I installed smokeping on centos 6 and service smokeping status, shows that smokeping is stopped. Running command   /opt/smokeping/bin/smokeping shows: 
    Can’t locate in @INC (@INC contains: /opt/smokeping/lib /usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/auto/RRDs/ /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /opt/smokeping/lib/ line 5.BEGIN failed–compilation aborted at /opt/smokeping/lib/ line 5.Compilation failed in require at /opt/smokeping/bin/smokeping line 7.BEGIN failed–compilation aborted at /opt/smokeping/bin/smokeping line 7.

    What can be wrong?

  • Rado3105

    No 5.10.1 but 5.8.8. But I have installed perl 5.10.1.

  • Rado3105

    Installing perl-CGI solved the problem, but it showed another one:

    Can’t locate in @INC (@INC contains: /opt/smokeping/lib /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/RRDs/ /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /opt/smokeping/lib/ line 12. BEGIN failed–compilation aborted at /opt/smokeping/lib/ line 12. Compilation failed in require at /opt/smokeping/bin/smokeping line 7. BEGIN failed–compilation aborted at /opt/smokeping/bin/smokeping line 7.

    and on line 12 is this:
    use RRDs;

    but rrdtool is installed:
    Package rrdtool-1.4.4-1.el5.rf.i386 already installed and latest version

  • Anonymous

    # yum install perl-rrdtool

  • Tolli

    I’m having the same problem on CentOS 6 64 bit – installed perl-CGI and now having problems with

    Installed PackagesName       : perl-rrdtoolArch       : x86_64Version    : 1.4.4Release    : 1.el5.rf

    # locate

    Tried changing the “use lib” line in bin/smokeping that points to …/RRDs/ to point to this folder or the itself, without luck.

    Any ideas?

  • DigitalDude

    I’m getting this:
    ERROR: /opt/smokeping/etc/config (Slaves/slave2): mandatory variable ‘display_name’ not defined

  • sarmed

    I had the same error..i replaced my entire /opt/smokeping/etc/config with the sample given, and it worked. hope it helps.

  • soundsLikekong

    just remove the stale +slave2 line

  • Nguyentricuong21071987

    My log: Symbolic link not allowed or link target not accessible: /var/www/html/smokeping/smokeping.cgi
    Link: http://ip/smokeping/smokeping.cgi
    Please help me to fix it. Thanks

  • Anonymous

    Hi Guys
    I’m about to install smokeping on my CentOS 6.2 X86_64. I get stuck while trying to compile with the message :

    checking checking for perl module ‘RRDs’… Ok
    checking checking for perl module ‘FCGI’… Ok
    checking checking for perl module ‘CGI’… Ok
    checking checking for perl module ‘CGI::Fast’… Ok
    checking checking for perl module ‘Config::Grammar’… Failed
    checking checking for perl module ‘Digest::HMAC_MD5’… Ok
    checking checking for perl module ‘LWP’… Ok

    I found this :
    But when installing I get :
    error: Failed dependencies:        perl(:MODULE_COMPAT_5.8.8) is needed by perl-Config-Grammar-1.10-4.el5.noarch
    I’ll appreciate any help !

  • babolat

    I receive an Error 500 when browsing to localhost/smokeping/smokeping.cgi

    SELinux is running permissive mode, no errors in /var/log/messages. Do have errors in/var/log/httpd/error_log:

    [Sat Feb 04 16:38:48 2012] [error] [client] (2)No such file or directory: exec of ‘/var/www/html/smokeping/smokeping.cgi’ failed
    [Sat Feb 04 16:38:48 2012] [error] [client] Premature end of script headers: smokeping.cgi
    [Sat Feb 04 16:38:48 2012] [error] [client] File does not exist: /var/www/html/favicon.ico
    [Sat Feb 04 16:45:03 2012] [error] [client] script not found or unable to stat: /var/www/cgi-bin/test-cgi

    Any suggestions are greatly appreciated. Thanks!!

  • babolat

    @159ec39bc2b9bd92e357a6e5ae4e66cd:disqus¬†, that was my first issue. If you see no change after you perform “chmod 700 /opt/smokeping/bin/smokeping” ensure SELinux is in permissive mode:
    setenforce 0

    Then, if you perform:

    service smokeping restart
    service smokeping status

    Hopefully it’ll return “running.” If it is indeed the same issue as mine, it’ll return “smokeping dead but subsys locked” :-/

  • Anonymous

    As this article is over a year and a half old I will have to go through an installation to familiarize myself again.

    Expect an update this coming weekend.

  • SirTonic

    I have problem, I have CentOS 6.2 smokeping is running as service, but apache view cgi script as plain text. I checked httpd.conf and my option is corectly.

    AddHandler cgi-script .cgi – is OK
    Options Indexes FollowSymLinks ExecCGI – is OK

    pls Help me

  • Chris

    Its seems there are a few people with this issue after following this guide:

    when running /opt/smokeping/bin/smokeping it gives the following error:

    Can’t locate in @INC (@INC contains: /opt/smokeping/lib /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/RRDs /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /opt/smokeping/lib/ line 13.BEGIN failed–compilation aborted at /opt/smokeping/lib/ line 13.Compilation failed in require at /opt/smokeping/bin/smokeping line 7.BEGIN failed–compilation aborted at /opt/smokeping/bin/smokeping line 7.

    I too am getting the same message, however all packages are installed and up to date and the guide has been followed to the letter and re-checked several times. ¬†There doesn’t seem to be any answers and my linux isnt good enough to diagnose myself, I have tried for several hours.

    If anyone can suggest anything I would be grateful

  • Chris

     yum list httpd rrdtool fping echoping curl perl perl-Net-Tel                                                                             net perl-Net-DNS perl-LDAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL p                                                                             erl-Socket6 perl-CGI-SpeedyCGI
    Loaded plugins: fastestmirror, priorities
    Loading mirror speeds from cached hostfile
     * base:
     * extras:
     * rpmforge:
     * updates:
    base                                                                                                                                  | 3.7 kB     00:00
    extras                                                                                                                                | 3.5 kB     00:00
    rpmforge                                                                                                                              | 1.1 kB     00:00
    updates                                                                                                                               | 3.5 kB     00:00
    Installed Packages
    curl.i686                                                     7.19.7-26.el6_1.2                                        @base
    echoping.i386                                                 5.2.0-1.2.el5.rf                                         @rpmforge
    fping.i386                                                    2.4-1.b2.3.el5.rf                                        @rpmforge
    httpd.i686                                                    2.2.15-15.el6.centos                                     @base
    perl.i686                                                     4:5.10.1-119.el6_1.1                                     @base
    perl-CGI-SpeedyCGI.i386                                       2.22-1.2.el5.rf                                          @rpmforge
    perl-IO-Socket-SSL.noarch                                     1.31-2.el6                                               @base
    perl-LDAP.noarch                                              1:0.40-1.el6                                             @base
    perl-Net-DNS.i686                                             0.65-4.el6                                               @base
    perl-Net-Telnet.noarch                                        3.03-11.el6                                              @base
    perl-RadiusPerl.noarch                                        0.15-1.el5.rf                                            @rpmforge
    perl-Socket6.i686                                             0.23-3.el6                                               @base
    perl-libwww-perl.noarch                                       5.833-2.el6                                              @anaconda-centos-201106051823.i386/6.0
    rrdtool.i386                                                  1.4.5-1.el5.rf                                           @rpmforge
    Available Packages
    rrdtool.i686                                                  1.3.8-6.el6                                              base

  • Chris

    yum install perl perl-Net-Telnet perl-Net-DNS perl-L                                                                             DAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6 perl-CGI-Sp                                                                             eedyCGI

    Loaded plugins: fastestmirror, priorities
    Loading mirror speeds from cached hostfile
     * base:
     * epel:
     * extras:
     * rpmforge:
     * updates:
    epel                                                     | 3.7 kB     00:00
    epel/primary_db                                          | 3.1 MB     00:15
    Setting up Install Process
    Package 4:perl-5.10.1-119.el6_1.1.i686 already installed and latest version
    Package perl-Net-Telnet-3.03-11.el6.noarch already installed and latest version
    Package perl-Net-DNS-0.65-4.el6.i686 already installed and latest version
    Package 1:perl-LDAP-0.40-1.el6.noarch already installed and latest version
    Package perl-libwww-perl-5.833-2.el6.noarch already installed and latest version
    Package perl-RadiusPerl-0.15-1.el5.rf.noarch already installed and latest versio                                                                             n
    Package perl-IO-Socket-SSL-1.31-2.el6.noarch already installed and latest versio                                                                             n
    Package perl-Socket6-0.23-3.el6.i686 already installed and latest version
    Resolving Dependencies
    –> Running transaction check
    —> Package perl-CGI-SpeedyCGI.i386 0:2.22-1.2.el5.rf will be updated
    —> Package perl-CGI-SpeedyCGI.i386 0:2.22-4.el5 will be an update
    –> Processing Dependency: perl(:MODULE_COMPAT_5.8.8) for package: perl-CGI-Spee ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† dyCGI-2.22-4.el5.i386
    –> Finished Dependency Resolution
    Error: Package: perl-CGI-SpeedyCGI-2.22-4.el5.i386 (epel)
               Requires: perl(:MODULE_COMPAT_5.8.8)
    ¬†You could try using –skip-broken to work around the problem
    ¬†You could try running: rpm -Va –nofiles –nodigest

  • David Dayson

    patch -p1 -i smokeping.patch /opt/smokeping/bin/smokeping
    patching file /opt/smokeping/bin/smokeping
    Hunk #1 FAILED at 1.
    1 out of 1 hunk FAILED — saving rejects to file /opt/smokeping/bin/smokeping.rej

    On the first patch i get this error

  • Juanhernandez

    I have a big problem with centos 6.2…

    Can’t locate in @INC (@INC contains: /opt/smokeping/lib /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/RRDs/ /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /opt/smokeping/bin/smokeping line 7.
    BEGIN failed–compilation aborted at /opt/smokeping/bin/smokeping line 7.

  • Rahul_1806

    As per tutorials I have installed on Centos 5.5 no error found while installation. Smokeping service does not start. It shows OK but status it says stopped… If anyone help I would be greatful ¬†¬†

  • Gwhite

    Haven’t tested this theory yet, but it looks like that directory is the one used in CentOS 5. On the machine I’m currently attempting to configure I issued ¬† rpm -ql rrdtool-perl and part of the output was for /usr/lib64/perl5/auto/RRDs ¬† this is as close as I’ve gotten so far to something that looks right.¬†

  • Yunus Ibrahim

    Hi Thanks for the tutorial, i ve follow all but at the end when i m trying to browse the http://myhost/smokeping/smokeping.cgi i m getting a error :

    Internal Server Error

    The server encountered an internal error or
    misconfiguration and was unable to complete
    your request.

    Please contact the server administrator,
    root@localhost and inform them of the time the error occurred,
    and anything you might have done that may have
    caused the error.

    More information about this error may be available
    in the server error log.

  • vonskippy

    Any consultants that can help debug a SMOKEPING install?

    We’re a Public Library and are trying to troubleshoot our 3 ISP Circuits that randomly drop off line. Of course the ISP says there is no problem. We’ve bumped the problem up to Corporate, but need real proof of the problem. We’re hoping that SMOKEPING will highlight the exact time and if it’s a complete drop or just a slowdown.

    I’ve installed the app on VPS in the closest big city (Denver), and want to monitor the 3 circuits via monitoring the latency by pinging the three Firewall Interfaces just inside each of the cable modems.

    It almost works. Both httpd and smokeping are running, and system monitoring is showing consistent traffic in and out, so it appears to be working. But there is no graphs, just a few text headings that seem to mimic the examples on the smokeping site.

    If interested, please email your rates and availability (and a ballpark price to get a working SMOKEPING install).

    Thanks (email me at vonskippy AT gmail DOT com).

  • Iain

    Just discovered that myself and came here to check it was documented. Glad to see it’s been found already!

    You don’t need to have the full path – just changing the capital “S” to lower case works.