April 21, 2014

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
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

http://oss.oetiker.ch/smokeping/

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

* www.how2centos.com (IP 10.0.0.100): CentOS 5.5 i386 base installation

Lets begin by installing the framework required by Smokeping.

# yum install yum-priorities

Install the EPEL i386 YUM Repository

# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Install the RPMForge i386 YUM Repository

# rpm -Uvh http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm

# yum install httpd
# yum install rrdtool
# yum install fping
# yum install echoping
# yum install curl
# yum install perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI

# wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.4.1.tar.gz
# tar zxvf smokeping-2.4.1.tar.gz
# mv smokeping-2.4.1 /opt/smokeping
# cd /opt/smokeping

# cd bin/
# cp smokeping.dist smokeping
# cd ../htdocs/
# cp smokeping.cgi.dist smokeping.cgi
# cp tr.cgi.dist tr.cgi
# cd ../etc/
# cp config.dist config
# cp basepage.html.dist basepage.html
# cp smokemail.dist smokemail
# cp tmail.dist tmail
# cp smokeping_secrets.dist smokeping_secrets
# chmod 600 /opt/smokeping/etc/smokeping_secrets

# vi /opt/smokeping/bin/smokeping

Replace this:

1
2
3
4
5
6
7
8
9
#!/usr/sepp/bin/perl-5.8.4 -w
# -*-perl-*-
 
use lib qw(/usr/pack/rrdtool-1.2.23-mo/lib/perl);
use lib qw(lib);
 
use Smokeping 2.004000;
 
Smokeping::main("etc/config.dist");

With This:

1
2
3
4
5
6
7
8
9
#!/usr/bin/perl -w
# -*-perl-*-
 
use lib qw(/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/RRDs/);
use lib qw(/opt/smokeping/lib);
 
use Smokeping 2.004000;
 
Smokeping::main("/opt/smokeping/etc/config");

or you can Patch the file:

# cd /opt/smokeping/bin
# vi /opt/smokeping/bin/smokeping.patch

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
*** /opt/smokeping/bin/smokeping.dist   2008-06-10 15:08:07.000000000 +0200
--- /opt/smokeping/bin/smokeping        2010-08-04 16:43:08.000000000 +0200
***************
*** 1,12 ****
! #!/usr/sepp/bin/perl-5.8.4 -w
  # -*-perl-*-
 
! use lib qw(/usr/pack/rrdtool-1.2.23-mo/lib/perl);
! use lib qw(lib);
 
  use Smokeping 2.004000;
!
! Smokeping::main("etc/config.dist");
 
  =head1 NAME
 
--- 1,12 ----
! #!/usr/bin/perl -w
  # -*-perl-*-
 
! use lib qw(/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/RRDs/);
! use lib qw(/opt/smokeping/lib);
 
  use Smokeping 2.004000;
!
! Smokeping::main("/opt/smokeping/etc/config");
 
  =head1 NAME

# patch -p1 -i smokeping.patch /opt/smokeping/bin/smokeping
patching file /opt/smokeping/bin/smokeping

# vi /opt/smokeping/htdocs/smokeping.cgi

Replace this:

1
2
3
4
5
6
7
8
9
10
#!/usr/sepp/bin/speedy -w
# -*-perl-*-
 
use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib);
use CGI::Carp qw(fatalsToBrowser);
 
use Smokeping 2.004000;
 
Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config");

With this:

1
2
3
4
5
6
7
8
9
10
#!/usr/bin/speedy -w
# -*-perl-*-
 
use lib qw(/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/RRDs);
use lib qw(/opt/smokeping/lib);
use CGI::Carp qw(fatalsToBrowser);
 
use Smokeping 2.004000;
 
Smokeping::cgi("/opt/smokeping/etc/config");

or you can Patch the file:

# cd /opt/smokeping/htdocs/
# vi /opt/smokeping/htdocs/smokeping_cgi.patch

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
***************
*** 1,13 ****
! #!/usr/sepp/bin/speedy -w
  # -*-perl-*-
 
! use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
! use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib);
  use CGI::Carp qw(fatalsToBrowser);
 
  use Smokeping 2.004000;
 
! Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config");
 
  =head1 NAME
 
--- 1,13 ----
! #!/usr/bin/speedy -w
  # -*-perl-*-
 
! use lib qw(/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/RRDs);
! use lib qw(/opt/smokeping/lib);
  use CGI::Carp qw(fatalsToBrowser);
 
  use Smokeping 2.004000;
 
! Smokeping::cgi("/opt/smokeping/etc/config");
 
  =head1 NAME

# patch -p1 -i smokeping_cgi.patch /opt/smokeping/htdocs/smokeping.cgi
patching file /opt/smokeping/htdocs/smokeping.cgi

# cd /opt/smokeping/htdocs
# vi /opt/smokeping/htdocs/tr.cgi

Change this:

1
2
3
4
#!/usr/sepp/bin/speedy-5.8.8 -w
use strict;
use lib qw(/home/oposs/smokeping/software/lib);
use lib qw(perl);

To this:

1
2
3
4
#!/usr/bin/speedy -w
use strict;
use lib qw(/opt/smokeping/lib);
use lib qw(perl);

or you can Patch the file:

# vi /opt/smokeping/htdocs/tr_cgi.patch

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
*** /opt/smokeping/htdocs/tr.cgi.dist   2008-06-14 00:02:34.000000000 +0200
--- /opt/smokeping/htdocs/tr.cgi        2010-08-06 15:01:31.000000000 +0200
***************
*** 1,6 ****
! #!/usr/sepp/bin/speedy-5.8.8 -w
  use strict;
! use lib qw(/home/oposs/smokeping/software/lib);
  use lib qw(perl);
 
  use CGI;
--- 1,6 ----
! #!/usr/bin/speedy -w
  use strict;
! use lib qw(/opt/smokeping/lib);
  use lib qw(perl);
 
  use CGI;

# patch -p1 -i tr_cgi.patch /opt/smokeping/htdocs/tr.cgi
patching file /opt/smokeping/htdocs/tr.cgi

# mkdir -p /var/www/html/smokeping/img /var/www/html/smokeping/script/ /opt/smokeping/data /opt/smokeping/var
# chown -R apache:apache /var/www/html/smokeping/img

# ln -s /opt/smokeping/htdocs/cropper /var/www/html/smokeping/cropper
# ln -s /opt/smokeping/htdocs/resource /var/www/html/smokeping/resource
# ln -s /opt/smokeping/htdocs/script/Tr.js /var/www/html/smokeping/script/Tr.js
# ln -s /opt/smokeping/htdocs/smokeping.cgi /var/www/html/smokeping/smokeping.cgi
# ln -s /opt/smokeping/htdocs/tr.cgi /var/www/html/smokeping/tr.cgi

# chmod 4775 /bin/traceroute

vi /etc/httpd/conf/httpd.conf

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

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

change > Options Indexes FollowSymLinks
to > Options Indexes FollowSymLinks ExecCGI

# vi /opt/smokeping/etc/basepage.html

Change this:

1
2
3
4
<script src="cropper/lib/prototype.js" type="text/javascript"></script>
<script src="cropper/lib/scriptaculous.js?load=builder,dragdrop" type="text/javascript"></script>
<script src="cropper/cropper.js" type="text/javascript"></script>
<script src="cropper/smokeping-zoom.js" type="text/javascript"></script>

To this:

1
2
3
4
<script src="/smokeping/cropper/lib/prototype.js" type="text/javascript"></script>
<script src="/smokeping/cropper/lib/scriptaculous.js?load=builder,dragdrop" type="text/javascript"></script>
<script src="/smokeping/cropper/cropper.js" type="text/javascript"></script>
<script src="/smokeping/cropper/smokeping-zoom.js" type="text/javascript"></script>

or you can Patch the file:

# cd /opt/smokeping/etc/
# vi /opt/smokeping/etc/basepage.patch

1
2
3
4
5
6
7
8
9
10
56,59c56,59
< <script src="cropper/lib/prototype.js" type="text/javascript"></script>
< <script src="cropper/lib/scriptaculous.js?load=builder,dragdrop" type="text/javascript"></script>
< <script src="cropper/cropper.js" type="text/javascript"></script>
< <script src="cropper/smokeping-zoom.js" type="text/javascript"></script>
---
> <script src="/smokeping/cropper/lib/prototype.js" type="text/javascript"></script>
> <script src="/smokeping/cropper/lib/scriptaculous.js?load=builder,dragdrop" type="text/javascript"></script>
> <script src="/smokeping/cropper/cropper.js" type="text/javascript"></script>
> <script src="/smokeping/cropper/smokeping-zoom.js" type="text/javascript"></script>

# patch -p1 -i basepage.patch /opt/smokeping/etc/basepage.html
patching file /opt/smokeping/etc/basepage.html

# vi /opt/smokeping/htdocs/tr.html

Change this:

1
2
3
4
5
6
7
<html>
	<head>
	  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>SmokeTrace</title>
	  <script type="text/javascript" src="script/Tr.js"></script>
	</head>
</html>

To this:

1
2
3
4
5
6
7
<html>
	<head>
	  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>SmokeTrace</title>
	  <script type="text/javascript" src="/script/Tr.js"></script>
	</head>
</html>

# ln -s /opt/smokeping/htdocs/tr.html /var/www/html/smokeping/tr.html

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

# vi /opt/smokeping/etc/config

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
*** General ***
 
owner    = Peter Random
contact  = some@address.nowhere
mailhost = my.mail.host
sendmail = /usr/sbin/sendmail
# NOTE: do not put the Image Cache below cgi-bin
# since all files under cgi-bin will be executed ... this is not
# good for images.
imgcache = /var/www/html/smokeping/img
imgurl   = http://www.how2centos.com/smokeping/img
datadir  = /opt/smokeping/data
piddir  = /opt/smokeping/var
cgiurl   = http://www.how2centos.com/smokeping/smokeping.cgi
smokemail = /opt/smokeping/etc/smokemail
tmail = /opt/smokeping/etc/tmail
 
# specify this to get syslog logging
syslogfacility = local0
 
# each probe is now run in its own process
# disable this to revert to the old behaviour
# concurrentprobes = no
 
*** Alerts ***
to = alertee@address.somewhere
from = smokealert@company.xy
 
+someloss
type = loss
# in percent
pattern = >0%,*12*,>0%,*12*,>0%
comment = loss 3 times  in a row
 
*** Database ***
 
step     = 300
pings    = 20
 
# consfn mrhb steps total
 
AVERAGE  0.5   1  1008
AVERAGE  0.5  12  4320
    MIN  0.5  12  4320
    MAX  0.5  12  4320
AVERAGE  0.5 144   720
    MAX  0.5 144   720
    MIN  0.5 144   720
 
*** Presentation ***
 
template = /opt/smokeping/etc/basepage.html
 
+ charts
 
menu = Charts
title = The most interesting destinations
 
++ stddev
sorter = StdDev(entries=>4)
title = Top Standard Deviation
menu = Std Deviation
format = Standard Deviation %f
 
++ max
sorter = Max(entries=>5)
title = Top Max Roundtrip Time
menu = by Max
format = Max Roundtrip Time %f seconds
 
++ loss
sorter = Loss(entries=>5)
title = Top Packet Loss
menu = Loss
format = Packets Lost %f
 
++ median
sorter = Median(entries=>5)
title = Top Median Roundtrip Time
menu = by Median
format = Median RTT %f seconds
 
+ overview
 
width = 600
height = 50
range = 10h
 
+ detail
 
width = 600
height = 200
unison_tolerance = 2
 
"Last 3 Hours"    3h
"Last 30 Hours"   30h
"Last 10 Days"    10d
"Last 400 Days"   400d
 
#+ hierarchies
#++ owner
#title = Host Owner
#++ location
#title = Location
 
*** Probes ***
 
+ FPing
 
binary = /usr/sbin/fping
 
*** Targets ***
 
menuextra = <a target='_blank' href='/smokeping/tr.html{HOST}' class='{CLASS}' \
onclick="window.open(this.href,this.target, \
'width=800,height=500,toolbar=no,location=no,status=no,scrollbars=no'); \
return false;">(TR)</a>
 
probe = FPing
 
menu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website of xxx Company. \
         Here you will learn all about the latency of our network.
 
+ hosts
menu= Targets
 
++ How2CentOS
 
menu = How2CentOS.com
title = How2CentOS.com
alerts = someloss
host = www.how2centos.com
 
++ CentOS
 
menu = CentOS.org
title = CentOS.org
alerts = someloss
host = www.centos.org

Lets create a service startup script for Smokeping

# vi /etc/init.d/smokeping

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
#
# chkconfig: 2345 80 05
# Description: Smokeping init.d script
# Hacked by : How2CentOS - http://www.how2centos.com
 
# Get function from functions library
. /etc/init.d/functions
 
# Start the service Smokeping
start() {
        echo -n "Starting Smokeping: "
        /opt/smokeping/bin/smokeping >/dev/null 2>&1
        ### Create the lock file ###
        touch /var/lock/subsys/smokeping
        success $"Smokeping startup"
        echo
}
 
# Restart the service Smokeping
stop() {
        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
}
 
### main logic ###
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status Smokeping
        ;;
  restart|reload|condrestart)
        stop
        start
        ;;
  *)
        echo $"Usage: $0 {start|stop|restart|reload|status}"
        exit 1
esac
 
exit 0

# chmod 755 /etc/init.d/smokeping

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

# chkconfig smokeping on
# chkconfig httpd on
# service smokeping start
Starting Smokeping: [ OK ]
# service httpd start
Starting httpd: [ OK ]

Now browse to your new installed Smokeping and Smoketrace installation

http://www.how2centos.com/smokeping/smokeping.cgi

  • http://www.gotaclick.com/search-engine-optimization/ Search Engine Optimization

    Sjoe! quite a monster of a tutorial there! Good one man :) Thanks for the effort!

  • http://weblog.frlinux.net 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);

  • http://pulse.yahoo.com/_P7BSE7GUPH2HBT72WEGWOLRWEQ 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

    Under

    change > Options Indexes FollowSymLinks
    to > Options Indexes FollowSymLinks ExecCGI

  • http://pulse.yahoo.com/_P7BSE7GUPH2HBT72WEGWOLRWEQ 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?

  • http://pulse.yahoo.com/_P7BSE7GUPH2HBT72WEGWOLRWEQ 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/Smokeping.pm 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?

  • http://pulse.yahoo.com/_B3GFKCKHPI5EQQIDCGWPUV5VTA 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 http://hostname.my.com/smokeping/tr.html 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

    Hi,

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

    Cheers

    wingZero

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

  • http://twitter.com/it2go 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 RRDs.pm 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

    ~~snip~~

    # 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/Smokeping.pm line 837

  • tomcatrocks.de

    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 CGI.pm 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/Smokeping.pm line 5.BEGIN failed–compilation aborted at /opt/smokeping/lib/Smokeping.pm 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 RRDs.pm 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/Smokeping.pm line 12. BEGIN failed–compilation aborted at /opt/smokeping/lib/Smokeping.pm 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 RRDs.pm.

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

    # locate RRDs.pm
    /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/RRDs.pm

    Tried changing the “use lib” line in bin/smokeping that points to …/RRDs/ to point to this folder or the RRDs.pm 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 :
    perl-Config-Grammar-1.10-4.el5.noarch.rpm
    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 172.18.2.61] (2)No such file or directory: exec of ‘/var/www/html/smokeping/smokeping.cgi’ failed
    [Sat Feb 04 16:38:48 2012] [error] [client 172.18.2.61] Premature end of script headers: smokeping.cgi
    [Sat Feb 04 16:38:48 2012] [error] [client 172.18.2.61] File does not exist: /var/www/html/favicon.ico
    [Sat Feb 04 16:45:03 2012] [error] [client 172.18.2.61] 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

    Hello,
    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 RRDs.pm 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/Smokeping.pm line 13.BEGIN failed–compilation aborted at /opt/smokeping/lib/Smokeping.pm 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: mirrors.supportex.net
     * extras: mirror.sov.uk.goscomb.net
     * rpmforge: ftp-stud.fht-esslingen.de
     * updates: mirror.sov.uk.goscomb.net
    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: mirrors.coreix.net
     * epel: mirrors.coreix.net
     * extras: mirrors.coreix.net
     * rpmforge: ftp-stud.fht-esslingen.de
     * updates: mirrors.coreix.net
    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 smokeping.pm 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.