How to install smokeping on CentOS 7 linux
Today, we will show you how to install smokeping on CentOS 7 linux.
Smokeping software is one of the most popular network management software used by service providers and can only be implemented on Linux-based operating systems.
It allows a servers to be analyzed by a user interface. This software is very lightweight and will not require many resources to launch.
Availability checks is one of the most usage of smokeping.
Here is our environment:
OS: CentOS 7 linux on VMWare
Firewall: enabled
SELinux: permissive
1- Install prerequisites
To install smokeping, we first need to install other software packages that are listed as Dependencies of smokeping.
With the command below we will install them. In addition to the original repository of the operating system itself, Epel must also be installed:
# yum install epel-release # yum install mod_fcgid httpd httpd-devel rrdtool rrdtool-perl fping wget curl bind-utils gcc make perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI perl-FCGI perl-RRD-Simple perl-CGI-SpeedCGI perl-ExtUtils-MakeMaker perl-rrdtool perl-core
2- Install smokeping
Now download the latest version of Smokeping from smokeping FTP server:
# wget https://oss.oetiker.ch/smokeping/pub/smokeping-2.7.3.tar.gz
then extract it in the /opt:
# tar -zxvf smokeping-2.7.3.tar.gz -C /opt/
create a directory called smokeping in /opt:
# mkdir /opt/smokeping/
then go to extracted smokeping archive and run configure script:
# cd /opt/smokeping-2.7.3/ # ./configure --prefix=/opt/smokeping
now install smokeping by running:
# /usr/bin/gmake install
3- Configure smokeping
now created required directories:
# cd /opt/smokeping/ # mkdir data var cache
change config files names:
# cd etc/ # for foo in *.dist; do mv $foo `basename $foo .dist`; done
then change permission of smokeping secret file and some ownerships:
# chmod 600 etc/smokeping_secrets.dist # ln -s /opt/smokeping/cache /opt/smokeping/htdocs/cache # chown -R apache cache # chown -R apache data
create smokeping.conf file in httpd conf directory and put the following content in it:
# vim /etc/httpd/conf.d/smokeping.conf
ScriptAlias /smokeping/smokeping.cgi /opt/smokeping/htdocs/smokeping.fcgi.dist Alias /smokeping /opt/smokeping/htdocs <Directory "/opt/smokeping/htdocs"> Options FollowSymLinks Require all granted </Directory>
then open smokeping config file:
# vim /opt/smokeping/etc/config
and change this line:
host = james.host
to:
host = 192.168.43.242 (replace this with your own IP)
4- Configure firewall
to view graphs and access web interface, we should open port 80:
# firewall-cmd --permanent --add-service=http # firewall-cmd --reload
5- Smokeping systemd service
basically, smokeping runs by executing its script and passing parameters. for better handling smokeping execution, we will make a systemd service unit for it.
so create a service unit file:
# vim /lib/systemd/system/smokeping.service
and put these lines in it:
[Unit] Description=Smokeping Server After=network.target remote-fs.target nss-lookup.target [Service] Type=simple ExecStart=/opt/smokeping/bin/smokeping --nodaemon --config=/opt/smokeping/etc/config --logfile=/var/log/smoke.log [Install] WantedBy=multi-user.target
6- Start Services
now it’s time to start httpd and smokeping services. run these command to start and check both services:
# systemctl start httpd # systemctl start smokeping # systemctl status httpd # systemctl status smokeping
then open browser and point to this addresss for smokeping web interface:
http://localhost/smokeping/smokeping.cgi
sir can you please help me out that i have install and configure smokeping with your given step . my graph is not working
Dear talha, have you disabled selinux?
No package perlNet-Telnet available.
No package perl-RadiusPerl available.
No package perl-RRD-Simple available.
No package perl-CGI-SpeedCGI available.
No package perlExtUtils-MakeMaker available.
httpd and smokeping are failing to start
Are you sure epel repository has been installed?
yum install perl-Net-Telnet
yum install perl-ExtUtils-MakeMaker
yum install perl-CGI-SpeedyCGI
yum install rrdtool-perl
will resolve most of your problems above
Thanks dave
Hello,
I have the same problem as Talha, with small changes I have now smokeping running but the graphs are not working.
SELinux status: disabled
apache root cache
I suggest you to view installation video on youtube and if the problem persists, look in logs and paste here for more investigation.
I get this error on centos 8
[Sat Oct 03 10:24:34.924419 2020] [core:error] [pid 65214:tid 139886136846080] (13)Permission denied: [client 192.168.220.101:58915] AH00035: access to /smokeping/smokeping.gci denied (filesystem path ‘/opt/smokeping/htdocs’) because search permissions are missing on a component of the path
this might be brutal, but I solved this error by doing a chown apache /opt/smokeping -R and then restarting httpd.
Dear Team I do thanks for you so much for guide us to install smokeping on linux (centos), we have done with ur video n cmd guide us n have no something error during installation but the graph not loading the graphic so any problem with that case, Here is my below configure on target : *** Targets ***
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.
+ Test
menu= Targets
#parents = owner:/Test/James location:/
++ James
menu = CentOS
title = CentOS Sever
alerts = someloss
slaves = boomer slave2
host = 10.11.12.15
+ VSR
menu = VSR SW
title = VSR POP
++ SW10
menu = Veng Sreng
title = SW01
host = 172.27.6.1
++ google
menu = google.com
title = google.com
host = http://www.google.com
++ MultiHost
menu = Multihost
title = James and James as seen from Boomer
host = /Test/James /Test/James~boomer