SmokePing is a tool that measures latency, packet loss, and latency distribution on a network. It’s written in Perl and works by sending Internet Control Message Protocol (ICMP) echo requests between two or more hosts on a network and recording how long it takes for each request to complete. SmokePing can be used to monitor the latency of individual applications, web servers, databases, and more, on both small local networks and large enterprise networks.
pre-setup (only for centos 7 users since the main package repo is down):
# This Smokeping example configuration file was automatically generated. # # Everything up to the Probes section is derived from a common template file. # See the Probes and Targets sections for the actual example. # # This example is included in the smokeping_examples document.
*** General ***
owner = Peter Random contact = some@address.nowhere mailhost = my.mail.host sendmail = /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 = /usr/local/smokeping/cache imgurl = cache datadir = /usr/local/smokeping/data piddir = /usr/local/smokeping/var cgiurl = http://192.168.69.109/smokeping/sm.cgi smokemail = /usr/local/smokeping/etc/smokemail.dist tmail = /usr/local/smokeping/etc/tmail.dist # 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 28800 AVERAGE 0.5 12 9600 MIN 0.5 12 9600 MAX 0.5 12 9600 AVERAGE 0.5 144 2400 MAX 0.5 144 2400 MIN 0.5 144 2400
*** Presentation ***
template = /usr/local/smokeping/etc/basepage.html.dist htmltitle = yes graphborders = no
+ 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
# Here we have just one probe, fping, pinging four hosts. # # The fping probe is using the default parameters, some of them supplied # from the Database section ("step" and "pings"), and some of them by # the probe module.
+FPing binary = /usr/local/sbin/fping
*** Targets ***
# The hosts are located in two sites of two hosts each, and the # configuration has been divided to site sections ('+') and host subsections # ('++') accordingly.
probe = FPing
menu = Top title = Network Latency Grapher remark = Welcome to this SmokePing website.
+ internet menu = internet sites title = popular sites on the internet
++ google host = google.com ++ linkedin host = linkedin.com
+ intranet menu = intranet sites title = Hosts in intranet
++ gateway host = gateway.home ++ dns host = pi.hole.home
–smokeping service file configuration–
Edit the smokeping.service file: /etc/systemd/system/smokeping.service
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[Unit] Description=Smokeping Server: Latency Logging and Graphing System After=syslog.target network-online.target
Alias /smokeping/cache /usr/local/smokeping/cache Alias /smokeping /usr/local/smokeping/htdocs/
1
systemctl enable httpd.service
–Reboot the system–
1
reboot
Note check and make sure there are approprite permissions set for the smokeping folder which should be 755 for /usr/local/smokeping if you encounter any issues related to service failing.