Smokeping.
SmokePing keeps track of your network latency with interactive graph explorer. Learn more at https://oss.oetiker.ch/smokeping/
Installation on CentOS 7
[baggy@localhost ~]$
sudo yum install epel-release -y
sudo yum install mod_fcgid httpd httpd-devel rrdtool perl-CGI-SpeedyCGI fping rrdtool-perl perl perl-Sys-Syslog -y
sudo yum install perl-CPAN perl-local-lib perl-Time-HiRes –y
sudo yum groupinstall "Development tools" –y
sudo wget http\://oss.oetiker.ch/smokeping/pub/smokeping-2.6.11.tar.gz
tar -zxvf smokeping-2.6.11.tar.gz
cd smokeping-2.6.11/setup
[baggy@localhost setup]$
sudo ./build-perl-modules.sh
sudo mkdir /opt/smokeping
cd ..
[baggy@localhost smokeping-2.6.11]$
sudo cp -r thirdparty /opt/smokeping/
./configure --prefix=/opt/smokeping
sudo /usr/bin/gmake install
cd /opt/smokeping/etc/
[baggy@localhost etc]$
sudo cp /opt/smokeping/etc/basepage.html.dist /opt/smokeping/etc/basepage.html
for FOO in *.dist; do sudo cp \$FOO `basename \$FOO .dist`\;done
sudo mkdir /opt/smokeping/img
sudo mkdir /opt/smokeping/data
sudo mkdir /opt/smokeping/var
sudo mkdir /opt/smokeping/cache
sudo chown -R apache:apache /opt/smokeping/img/
sudo chown -R apache:apache /opt/smokeping/cache/
sudo chmod 600 /opt/smokeping/etc/smokeping_secrets
sudo chmod 600 /opt/smokeping/etc/smokeping_secrets.dist
sudo mkdir /var/www/smokeping
sudo cp -R /opt/smokeping/htdocs/* /var/www/smokeping/
sudo mv /var/www/smokeping/smokeping.fcgi.dist /var/www/smokeping/smokeping.fcgi
sudo chown -R apache:apache /var/www/smokeping
sudo nano /etc/httpd/conf.d/smokeping.conf
Add the below lines to the file and save:
Alias /smokeping "/var/www/smokeping"
<Directory /var/www/smokeping>
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex smokeping.fcgi
</Directory>
[baggy@localhost etc]$Find and edit the line starting with cgiurl and add your ip address, for my case my IP is 192.168.56.4 and save
sudo nano /opt/smokeping/etc/config
cgiurl = http://192.168.56.4/smokeping.cgi
[baggy@localhost etc]Edit the SELINUX line to be disabled like below
sudo nano /etc/selinux/config
SELINUX=disabled
[baggy@localhost etc]$
firewall-cmd --add-service=http
sudo service httpd restart
Use web browser to open http://192.168.56.4/smokeping.cgi
Configuration
After successfull installation you will need to create a config file. Sample configuration file for measuring latency and dig (domain information groper) for DNS servers around the world. In your installation the file path is /opt/smokeping/etc/config
*** General *** owner = Paul S.I. Basondole contact = bassosimons@me.com mailhost = my.mail.host sendmail = /usr/sbin/sendmail imgcache = /opt/smokeping/cache imgurl = cache datadir = /opt/smokeping/data piddir = /opt/smokeping/var cgiurl = http://192.168.56.4/smokeping.cgi smokemail = /opt/smokeping/etc/smokemail.dist tmail = /opt/smokeping/etc/tmail.dist syslogfacility = local0 *** Alerts *** to = baggy@me.com from = smokealert@basonation.org +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.dist + 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 + DNS binary = /usr/bin/dig # mandatory forks = 5 offset = 50% step = 300 timeout = 15 pings = 5 *** Slaves *** secrets=/opt/smokeping/etc/smokeping_secrets.dist +boomer display_name=boomer color=0000ff +slave2 display_name=another color=00ff00 *** Targets *** probe = FPing menu = Top title = Network Latency Grapher remark = Welcome to the SmokePing website for DNS servers. \ Here you will learn all about the latency for the DNS servers. + PublicDNS #listing from https://public-dns.info/ on 28-05-2019 probe = DNS lookup = wikipedia.org menu = public dns title = public dns ++ google title = google host = 8.8.8.8 ++ opendns title = open dns host = 208.67.222.222 ++ afghanistan title = afghanistan host = 180.94.94.195 ++ albania title = albania host = 109.69.160.72 ++ algeria title = algeria host = 193.194.70.66 ++ andorra title = andorra host = 109.111.117.204 ++ anguilla title = anguilla host = 209.59.121.92 ++ antarctica title = antarctica host = 185.121.177.177 ++ antiguaandbarbuda title = antigua and barbuda host = 69.50.69.115 ++ argentina title = argentina host = 200.45.231.58 ++ armenia title = armenia host = 212.34.231.10 ++ australia title = australia host = 203.35.30.11 ++ austria title = austria host = 195.70.114.137 ++ azerbaijan title = azerbaijan host = 94.20.20.20 ++ bahamas title = bahamas:nassau host = 65.75.74.123 ++ bahrain title = bahrain host = 87.236.136.3 ++ bangladesh title = bangladesh host = 45.123.43.46 ++ barbados title = barbados host = 64.119.194.243 ++ belarus title = belarus host = 93.85.92.171 ++ belgium title = belgium host = 81.243.243.123 ++ bolivia title = bolivia host = 190.129.90.163 ++ bosnia title = 89.111.249.146 host = 89.111.249.146 ++ botswana title = botswana host = 154.70.151.66 ++ brazil title = brazil host = 189.58.102.145 ++ brunei title = brunei host = 202.152.77.212 ++ bulgaria title = bulgaria host = 85.196.135.154 ++ burundi title = burundi host = 41.79.47.6 ++ cambodia title = cambodia host = 175.100.120.27 ++ cameron title = cameron host = 41.211.108.4 ++ canada title = canada host = 70.33.217.231 ++ capeverde title = cape verde host = 41.79.124.10 ++ cayman title = cayman host = 162.247.220.1 ++ chile title = chile host = 200.50.111.130 ++ china title = china host = 180.76.76.76 ++ colombia title = colombia host = 200.118.2.88 ++ costarica title = costa rica host = 201.200.130.36 ++ croatia title = croatia host = 195.29.222.4 ++ cyprus title = cyprus host = 78.158.157.242 ++ czechrepublic title = czech republic host = 82.208.35.102 ++ denmark title = denmark host = 87.116.31.21 ++ dominicanrepublic title = dominican republic host = 186.149.243.52 ++ ecuador title = ecuador host = 186.46.130.66 ++ egypt title = egypt host = 196.201.244.7 ++ elsalvador title = el salvador host = 201.247.40.170 ++ estonia title = estonia host = 92.62.96.27 ++ ethiopia title = ethiopia host = 213.55.96.254 ++ fiji title = fiji host = 103.244.228.198 ++ finland title = finland host = 185.117.118.20 ++ france title = france host = 51.75.125.29 ++ gabon title = gabon host = 217.77.71.33 ++ gambia title = gambia host = 197.148.74.19 ++ georgia title = georgia host = 212.72.129.78 ++ germany title = germany host = 62.128.1.53 ++ ghana title = ghana host = 212.96.1.70 ++ greece title = greece host = 147.52.98.3 ++ guatemala title = guatemala host = 190.106.215.170 ++ guinea title = guinea host = 41.77.184.138 ++ haiti title = haiti host = 186.1.192.3 ++ honduras title = honduras host = 190.124.166.8 ++ hongkong title = hongkong host = 202.88.99.221 ++ hungary title = hungary host = 195.228.140.138 ++ iceland title = iceland host = 194.144.249.78 ++ india title = india host = 203.8.201.10 ++ indonesia title = indonesia host = 202.158.49.187 ++ iran title = iran host = 95.142.224.142 ++ iraq title = iraq host = 31.24.200.3 ++ ireland title = ireland host = 95.83.244.117 ++ israel title = israel host = 82.80.248.20 ++ italy title = italy host = 151.13.160.150 ++ jamaica title = jamaica host = 72.252.209.150 ++ japan title = japan host = 221.186.160.98 ++ jordan title = jordan host = 212.118.0.1 ++ kazakhstan title = kazakhstan host = 93.185.74.226 ++ kenya title = kenya host = 197.248.116.74 ++ korea title = korea host = 112.171.192.182 ++ kuwait title = kuwait host = 168.187.216.118 ++ krygyzstan title = krygyzstan host = 81.88.193.116 ++ latvia title = latvia host = 80.250.60.233 ++ lebanon title = lebanon host = 195.112.199.203 ++ libya title = libya host = 41.208.68.62 ++ lithuania title = lithuania host = 86.100.86.144 ++ luxembourg title = luxembourg host = 85.93.215.125 ++ macedonia title = macedonia host = 85.30.112.98 ++ malawi title = malawi host = 41.77.14.106 ++ malaysia title = malaysia host = 202.71.102.164 ++ mali title = mali host = 196.200.80.86 ++ malta title = malta host = 213.165.179.114 ++ mauritania title = mauritania host = 82.151.70.84 ++ mauritius title = mauritius host = 196.27.73.58 ++ mexico title = mexico host = 207.248.224.71 ++ moldova title = moldova host = 212.56.209.18 ++ mongolia title = mongolia host = 202.9.47.25 ++ morocco title = morocco host = 62.251.175.254 ++ myanmar title = myanmar host = 103.85.107.102 ++ namibia title = namibia host = 41.205.140.155 ++ nepal title = nepal host = 110.44.112.102 ++ netherlands title = netherlands host = 94.100.26.5 ++ newzealand title = new zealand host = 202.20.97.60 ++ nicaragua title = nicaragua host = 165.98.69.66 ++ nigeria title = nigeria host = 41.217.204.165 ++ norway title = norway host = 213.138.160.20 ++ pakistan title = pakistan host = 209.150.154.1 ++ palestine title = palestine host = 192.116.16.26 ++ panama title = panama host = 200.108.36.130 ++ newguine title = new guines host = 124.240.199.23 ++ paraguay title = paraguay host = 190.128.225.70 ++ peru title = peru host = 200.11.52.202 ++ philippines title = philippines host = 116.50.176.113 ++ poland title = poland host = 83.19.241.2 ++ portugal title = portugal host = 83.240.211.233 ++ puertorico title = puertorico host = 64.247.161.186 ++ qatar title = qatar host = 212.77.217.193 ++ romania title = romania host = 89.47.94.25 ++ russia title = russia host = 188.128.110.67 ++ saotomeandprincipe title = sao tome and principe host = 197.159.180.2 ++ saudiarabia title = saudiarabia host = 213.236.62.10 ++ senegal title = senegal host = 213.154.80.203 ++ seychelles title = seychelles host = 169.239.202.202 ++ singapore title = singapore host = 103.28.209.9 ++ slovakia title = sovakia host = 188.123.100.18 ++ slovenia title = slovenia host = 89.212.253.4 ++ southafrica title = south africa host = 196.220.63.34 ++ spain title = spain host = 212.89.12.23 ++ srilanka title = sri lanka host = 203.143.42.24 ++ sudan title = sudan host = 196.223.158.38 ++ suriname title = suriname host = 186.179.241.146 ++ sweden title = sweden host = 193.104.100.1 ++ switzerland title = switzerland host = 62.2.43.211 ++ syria title = syria host = 91.144.22.198 ++ taiwan title = taiwan host = 60.250.65.88 ++ tajikistan title = tajikistan host = 85.9.129.36 ++ thailand title = thailand host = 203.113.113.60 ++ togo title = togo host = 41.207.186.166 ++ trinidadandtobago title = trinidad and tobago host = 131.100.36.83 ++ tunisia title = tunisia host = 41.225.4.15 ++ turkey title = turkey host = 31.145.6.20 ++ uganda title = uganda host = 41.221.81.132 ++ ukraine title = ukraine host = 109.237.83.180 ++ uae title = united arab emirates host = 94.56.96.13 ++ uk title = united kingdom host = 213.146.187.20 ++ us title = united states host = 216.218.245.200 ++ uruguay title = uruguay host = 201.217.135.114 ++ uzbekistan title = uzbekistan host = 80.80.218.218 ++ venezuela title = venezuela host = 201.249.192.74 ++ vietnam title = vietnam host = 103.53.228.24 ++ zambia title = zambia host = 41.77.0.216 ++ zimbabwe title = zimbabwe host = 41.57.125.214 ++ tanzania menu = tanzania title = tanzania +++aptus title = aptus host = 41.79.69.13 +++simbanet title = simbanet host = 41.221.41.101 ++ MultiHost # using the hosts above to create a multi host graph for google and open DNS menu = MultiHost title = Overall DNS Performance host = /PublicDNS/google\ /PublicDNS/opendns
Troubleshooting
Do this after every change you make to the config file
[baggy@localhost ~]$
sudo service httpd restart
sudo /opt/smokeping/bin/smokeping
If you experience broken images on the web interface edit the config file as described below
[baggy@localhost etc]$ sudo nano /opt/smokeping/etc/config
Find and edit the imgurl value from cache to /smokeping
imgurl = /smokeping