Smokeping Install on CentOS7

Introduction

We will introduce how to introduce a tool called Smokeping that measures and visualizes network latency. You can analyze the latency of the server you want to measure like this and the fluctuation width along with the time axis.

1606106169447.png

environment

Timezone change

If it is UTC time, the time displayed by Smokeping will also be UTC, so change it to Japan time. The current setting is UTC.

[opc@smokeping ~]$ timedatectl
      Local time: Sun 2020-11-22 14:27:46 GMT
  Universal time: Sun 2020-11-22 14:27:46 UTC
        RTC time: Sun 2020-11-22 14:27:46
       Time zone: GMT (GMT, +0000)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a
[opc@smokeping ~]$

Change to Japan time.

sudo timedatectl set-timezone Asia/Tokyo

It has been changed to JST.

[opc@smokeping ~]$ timedatectl
      Local time: Sun 2020-11-22 23:28:15 JST
  Universal time: Sun 2020-11-22 14:28:15 UTC
        RTC time: Sun 2020-11-22 14:28:14
       Time zone: Asia/Tokyo (JST, +0900)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a
[opc@smokeping ~]$

Firewalld stopped

Since this environment is configured with Public Cloud (Oracle Cloud), the firewall function is enabled on the Public Cloud side. Firewalld inside CentOS will be stopped.

sudo systemctl stop firewalld
sudo systemctl disable firewalld

Smokeping Install

Install Smokeping from EPEL

sudo yum -y install smokeping

httpd is also automatically installed as a dependency, and the file for Smokeping is also automatically generated

[opc@smokeping ~]$ cat /etc/httpd/conf.d/smokeping.conf
<Directory "/usr/share/smokeping" >
  Require local
  # Require ip 2.5.6.8
  # Require host example.org
</Directory>

<Directory "/var/lib/smokeping" >
  Require local
  # Require ip 2.5.6.8
  # Require host example.org
</Directory>

# .fcgi : smokeping by mod_fcgid aka fastcgi
# _cgi  : plain old fashion cgi
ScriptAlias /smokeping/sm.cgi  /usr/share/smokeping/cgi/smokeping.fcgi
#ScriptAlias /smokeping/sm.cgi  /usr/share/smokeping/cgi/smokeping_cgi

Alias       /smokeping/images  /var/lib/smokeping/images
Alias       /smokeping         /usr/share/smokeping/htdocs
[opc@smokeping ~]$

Edit

sudo vim /etc/httpd/conf.d/smokeping.conf

By default, it is only local, so set the authority so that everyone can see it.

<Directory "/usr/share/smokeping" >
    Require all granted
</Directory>

<Directory "/var/lib/smokeping" >
    Require all granted
</Directory>

# .fcgi : smokeping by mod_fcgid aka fastcgi
# _cgi  : plain old fashion cgi
ScriptAlias /smokeping/sm.cgi  /usr/share/smokeping/cgi/smokeping.fcgi
#ScriptAlias /smokeping/sm.cgi  /usr/share/smokeping/cgi/smokeping_cgi

Alias       /smokeping/images  /var/lib/smokeping/images
Alias       /smokeping         /usr/share/smokeping/htdocs

Restart Apache and Smokeping

sudo systemctl restart httpd
sudo systemctl restart smokeping

If you rewrite the IP address and access the following URL, the page of the next image will be displayed. http://ipaddress/smokeping/sm.cgi

1606037009536.png

Target settings

Smokeping sets the target for measuring network latency.

sudo vim /etc/smokeping/config

Here is an excerpt from some of the original settings.

*** 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;">*</a>
#
probe = FPing

menu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website of <b>Insert Company Name Here</b>. \
         Here you will learn all about the latency of our network.

+ Ping

menu = Fedora
title = Fedora Pings

++ FedoraprojectOrg

menu = fedoraproject.org
title = Fedora Webserver
host = fedoraproject.org

++ DocsFedoraprojectOrg

menu = docs.fedoraproject.org
title = Fedora Docs Webserver
host = docs.fedoraproject.org

++ PlanetFedora

menu = planet.fedoraproject.org
title = Planet Fedora
host = planet.fedoraproject.org

After change

*** Targets ***

probe = FPing

menu = Top
title = Network Latency Grapher
remark = Welcome to the SmokePing website of <b>Insert Company Name Here</b>. \
         Here you will learn all about the latency of our network.

+ Ping
menu = OCI
title = OCI Pings

++ win-e2
menu = win-e2
title = win-e2
host = 10.0.0.5

++  win-e3
menu = win-e3
title = win-e3
host = 10.0.0.6

++ win-intel
menu = win-intel
title = win-intel
host = 10.0.0.7

++ win-e2-to-e3-paravirtual
menu = win-e2-to-e3-paravirtual
title = win-e2-to-e3-paravirtual
host = 10.0.0.10

++ win-e2-to-e3-vfio
menu = win-e2-to-e3-vfio
title = win-e2-to-e3-vfio
host = 10.0.0.11

++ linux-e3
menu = linux-e3
title = linux-e3
host = 10.0.0.8

++ metadata
menu = metadata
title = metadata
host = 169.254.169.254

You can also change the Ping execution interval. In my case, I wanted to measure the Ping result in detail, so I try to ping three times every three seconds. (If you set it every 1 second, an error will occur)

--step: How many seconds interval --pings: Number of pings to execute (minimum 3)

*** Database ***

step     = 3
pings    = 3

Reflect

sudo systemctl restart smokeping
sudo systemctl restart httpd

Error

Depending on the settings, the following error may occur.

Error: RRD parameter mismatch ('Wrong value of step: /var/lib/smokeping/rrd/Ping/e2-to-e3.rrd has 300, create string has 299'). You must delete /var/lib/smokeping/rrd/Ping/e2-to-e3.rrd or fix the configuration parameters.
For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.

https://smokeping-users.oetiker.narkive.com/QYblo4YW/rrd-parameter-mismatch-wrong-value-of-step

In such a case, it is OK to delete the past RDD file.

rm -f /var/lib/smokeping/rrd/Ping/*

Let's restart the service after deleting

systemctl restart smokeping
systemctl restart httpd

Automatic page refresh

Smokeping automatically reloads the web browser page. It depends on the setting, but it is automatically updated every 3 seconds, which is very worrisome.

You can stop the automatic update by editing the following file.

vim /etc/smokeping/basepage.html

Deleted the 8th line

<META HTTP-EQUIV="Refresh" CONTENT="<##step##>">

Service restart

systemctl restart smokeping
systemctl restart httpd

Reference URL

Top Page https://oss.oetiker.ch/smokeping/

How to Install https://oss.oetiker.ch/smokeping/doc/smokeping_install.en.html

How to Install https://www.qoosky.io/techs/4c3f3ab25f

How to Install https://qiita.com/makotaka/items/7a6cb91b78562b97ca03

How to track network delays using SmokePing on FreeBSD 11 https://www.codeflow.site/ja/article/how-to-track-network-latency-with-smokeping-on-freebsd-11

[Memo] Latency visualization started with SmokePing (1) Introduction http://pocketstudio.jp/log3/2012/04/24/smokeping/

[Memo] Latency visualization with SmokePing (2) DNS & HTTP response http://pocketstudio.jp/log3/2012/04/26/smokeping_dns_and_http_latency/

How to read the graph of SmokePing https://oss.oetiker.ch/smokeping/doc/reading.en.html

Recommended Posts

Smokeping Install on CentOS7
Install Golang on CentOS 8
Install Neo4j 4.1.3 on centOS
Install Vertica 10.0 on CentOS 6.10
Install nginx on centOS7
Install Python 3 on CentOS 7
Install kuromoji on CentOS7
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
Install Redmine 4.1.1 on CentOS 7
Install PostgreSQL 13 on CentOS 7.5
Install OpenFOAM v2006 on CentOS
Install Jenkins on Docker's CentOS
Install Apache on CentOS on VirtualBox
Try DPDK20 SDK on CentOS7 â‘ Install
Install Ruby 2.5 on CentOS 7 using SCL
Install Java Open JDK 8 on CentOS 7
How to install MariaDB 10.4 on CentOS 8
Install apache 2.4.46 from source on CentOS7
Steps to install MySQL 8 on CentOS 8
Steps to install devtoolset-6 on CentOS 7
Install Java 9 on windows 10 and CentOS 7
Install MariaDB (CentOS 8)
[CentOS] Install apache-loggen
OpenVPN on CentOS 8
Install samba4 from source code on CentOS8
Install the webmail client Rainloop on CentOS 8
How to install beta php8.0 on CentOS8
Install CentOS 7 on Raspberry pi 4 Model B
Install gradle on mac
Command to install nginx / PHP7 / php-fpm on CentOS7
Install Corretto 8 on Windows
Maven on CentOS 7 tutorial
Install OpenJDK on macOS
Docker installation on CentOS 6
Use perltidy on CentOS 8
Install pyqt5 on ubuntu
Try OpenLiteSpeed on CentOS8
Tomcat v8 on CentOS7
[CentOS7] Install aws cli
Install Docker on Manjaro
Zabbix 5 installation on CentOS 8
Install Ruby on Ubuntu 20.04
Use mod_auth_cas on CentOS 8
Install lombok on SpringToolSuite4
Install GitLab on CentOS 8 with no internet connection
Use bat on Centos.
Jetty v8 on CentOS7
Install Autoware on Ubuntu 18.04.5
Install openjdk11 on mac
Install CMS Made Simple v2.2.2 on LAMP on CentOS 7.3
Install OpenJDK 8 on mac
Install BookStack Documentation Wiki on Elastic Compute Service on CentOS 7
Install the latest hardware drivers from ELRepo on CentOS
Install MySQL 5.6 on CentOS6 [How to specify the version]
Install ag (the silver searcher) [on CentOS / Ubuntu / Mac]
Try RabbitMQ + PHP on CentOS
Install Docker on Windows 10 PRO
Network install CentOS 8 with Kickstart.
Install OpenJDK7 (JAVA) on ubuntu 14.04