Network performance monitoring tool smoking

What is smoking?

Smokeping is an open source software for monitoring network status and stability (developed by the author of RRDTool). It can monitor network conditions such as delay, packet loss rate, BGP multi line and so on; Smokeping will send various types of test data packets to the target equipment and system, measure and record, and graphically display the network delay, so as to clearly judge the instant communication situation of the network;

It can be used to monitor the network status of Qunhui host and the operation status of multiple vps. It supports email alarm.


Install in Docker mode on Qunhui.

Search the registry for smoking, select the first Linux server / smoking, and select the latest version.


In the docker folder, create a new folder and name it smokeping, and create two subdirectories in smokeping, named config and data respectively.

folderLoad pathremarks
/docker/smokeping/data/dataDatabase and application data directory
/docker/smokeping/config/configProfile directory


Ports cannot conflict

Local portContainer porttype


TZSet to Asia/Shanghai
PGID< GID > set to 1000
PUID< uid > set to 1000


Enter http: / / Qunhui IP:8580 in the browser to see the main interface

configuration file

The configuration file is in the / docker / smoking / config directory. Once you know its purpose, you can easily modify it later

AlertsAlarm settings
DatabaseSampling frequency setting
GeneralGeneral settings
httpd.confApache Web server settings
pathnamesPath setting
Presentationtemplate file
ProbesProbe setup
SlavesIn master-slave mode, the slave is set
ssmtp.confMail server settings
TargetsMonitoring target setting


Open the smoking / config / database file and use the default value, that is, ping 20 times in 300 seconds (5 minutes)


Edit the smoking / config / probes file, change in dns to, and others are the default

Mail alarm

Step 1: edit ssmtp.conf

The configuration takes effect and the container needs to be restarted

Except for the password, it's all below 👇

# Config file for sSMTP sendmail
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.

# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named
AuthPass=88 Private password for mailbox settings


# Where will the mail seem to come from?

# The full hostname

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address

Lao Su uses mailbox 88, and the relevant parameters can be found in the settings

After setting, you can enter the container through the "terminal" for Email sending debugging, and enter ssmtp - V on the command line , and then enter:

Subject: alert <Enter twice>

test123 <ctrl+D>

Go to your inbox to check your mail

Step 2: edit Alerts

Modify the red box

  • to: mailbox receiving alarm, or user-defined script;
  • from: the mailbox that sends the alarm information, that is, the mailbox set in ssmtp.conf in the previous step;

The following are the conditions for triggering the alarm

The lower setting is to trigger the alarm more easily. The actual application delay can be set at 200ms

*** Alerts ***
to =
from =
type = rtt
pattern = <20,<20,<20,<20,<20,>20,>20,>20
comment = Delay more than 20 for 3 consecutive times

type = loss
pattern = ==0%,==0%,==0%,==0%,==0%,>0%,>0%,>0%
comment = Sudden packet loss


Internet Sites are basically sites that we cannot access normally, so they need to be modified, otherwise there will be no data

Edit the smoking / config / targets file

Please make a backup before editing

The format is clear at a glance. It adopts a hierarchical structure, which is represented by +. For example, the first layer "+" and the second layer "+ +" can be added or modified by analogy

below 👇 This paragraph comes from , but it is fine tuned according to the Probes and Alerts we set earlier

+ Other
menu = Three network monitoring
title = Monitoring statistics
probe = FPing

++ dianxin
menu = Telecom network monitoring
title = Telecom network monitoring list
host = /Other/dianxin/dianxin-bj /Other/dianxin/dianxin-hlj /Other/dianxin/dianxin-tj /Other/dianxin/dianxin-sc /Other/dianxin/dianxin-sh /Other/dianxin/dianxin-gz

+++ dianxin-bj
menu = Beijing Telecom
title = Beijing Telecom
host =
alerts = rttdetect,lossdetect
+++ dianxin-hlj
menu = Heilongjiang Telecom
title = Heilongjiang Telecom
host =
alerts = rttdetect,lossdetect
+++ dianxin-tj
menu = Tianjin Telecom
title = Tianjin Telecom
host =
alerts = rttdetect,lossdetect
+++ dianxin-sc
menu = Sichuan Telecom
title = Sichuan Telecom
host =
alerts = rttdetect,lossdetect
+++ dianxin-sh
menu = Shanghai Telecom
title = Shanghai Telecom
host =
alerts = rttdetect,lossdetect
+++ dianxin-gz
menu = Guangdong Telecom
title = Guangdong Telecom
host =
alerts = rttdetect,lossdetect
++ liantong
menu = Unicom Network Monitoring
title = Unicom network monitoring list
host = /Other/liantong/liantong-bj /Other/liantong/liantong-hlj /Other/liantong/liantong-tj /Other/liantong/liantong-sc /Other/liantong/liantong-sh /Other/liantong/liantong-gz
+++ liantong-bj
menu = Beijing Unicom
title = Beijing Unicom
host =
alerts = rttdetect,lossdetect
+++ liantong-hlj
menu = Heilongjiang Unicom
title = Heilongjiang Unicom
host =
alerts = rttdetect,lossdetect
+++ liantong-tj
menu = Tianjin Unicom
title = Tianjin Unicom
host =
alerts = rttdetect,lossdetect
+++ liantong-sc
menu = Sichuan Unicom
title = Sichuan Unicom
host =
alerts = rttdetect,lossdetect
+++ liantong-sh
menu = Shanghai Unicom
title = Shanghai Unicom
host =
alerts = rttdetect,lossdetect
+++ liantong-gz
menu = Guangdong Unicom 
title = Guangdong Unicom 
host =
alerts = rttdetect,lossdetect
++ yidong
menu = Mobile network monitoring
title = Mobile network monitoring list
host = /Other/yidong/yidong-bj /Other/yidong/yidong-hlj /Other/yidong/yidong-tj /Other/yidong/yidong-sc /Other/yidong/yidong-sh /Other/yidong/yidong-gz 
+++ yidong-bj
menu = Beijing Mobile
title = Beijing Mobile
host =
alerts = rttdetect,lossdetect
+++ yidong-hlj
menu = Heilongjiang Mobile
title = Heilongjiang Mobile
host =
alerts = rttdetect,lossdetect
+++ yidong-tj
menu = Tianjin Mobile
title = Tianjin Mobile
host =
alerts = rttdetect,lossdetect
+++ yidong-sc
menu = Sichuan Mobile 
title = Sichuan Mobile 
host =
alerts = rttdetect,lossdetect
+++ yidong-sh
menu = Shanghai Mobile
title = Shanghai Mobile
host =
alerts = rttdetect,lossdetect
+++ yidong-gz
menu = Guangdong Mobile
title = Guangdong Mobile
host =
alerts = rttdetect,lossdetect

Because there is Chinese, use utf-8 format

The configuration takes effect and the container needs to be restarted

If it is saved with the default GB18030 code, the Chinese will be garbled

The normal display should be like this

Over time, data will be generated gradually

When the set delay (rttdetect) or packet loss (lossdetect) condition is triggered, an email reminder will be received

If there is a problem with mail settings, a dead.letter file will be generated in the config directory to record triggered alarms

After downloading, open the file with the following contents 👇 In this way

Reference documents

oetiker/SmokePing: The Active Monitoring System

SmokePing - About SmokePing

How to install SmokePing – sleeplessbeastie's notes

Smokeping installation and configuration - free and open source network performance monitoring tool visual master / slave deployment - dig station no - dig the fun of building a station

ssmtp - send mail from the command line | Hom

Keywords: Docker network

Added by WebMonkey on Sun, 19 Sep 2021 06:55:48 +0300