Iperf3 Server
iPerf3 is a tool for active measurements of the maximum achievable bandwidth on IP networks
Client bandwith test: iperf3 -c $public_iperf_server
Example:
- TCP:
iperf3 -c proof.ovh.net
- UDP:
iperf3 -c ping.online.net -u -b 0
Package to install: iperf3
To turn your server into iperf3 server
you can run many iperf3 proceeses as Systemd services.
Please follow the steps here: https://iperf.fr/iperf-servers.php
You can add StartLimitIntervalSec=0
in service description after Restart=always
to avoid the blocking of service restart by the system if it reachs a StartLimit
Metrics
Get iperf3 tests stats from /var/log/syslog
with telegraf to create Grafana Dashboard
Minimal telegraf.conf
[[inputs.tail]]
files = ["/var/log/nginx/access.log"]
from_beginning = false
grok_patterns = ["%{COMBINED_LOG_FORMAT}"]
name_override = "nginx_access_log"
grok_custom_pattern_files = []
data_format = "grok"
[[inputs.tail]]
files = ["/var/log/syslog"]
from_beginning = false
#grok_patterns = ["%{SYSLOGBASE}"]
#grok_patterns = ["%{SYSLOGBASE} Accepted connection from %{IPV4:clienti_ip:tag}, port %{NUMBER:port}"]
grok_patterns = ["local %{IPV4:iperf_ip:tag} port %{NUMBER:iperf_port} connected to %{IPV4:client_ip:tag} port %{NUMBER:client_port:tag}"]
name_override = "iperf3"
grok_custom_pattern_files = []
data_format = "grok"
GROK HELP:
https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html
https://grokdebug.herokuapp.com/
Install telegraf
Installation
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/debian buster stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
apt-get update && sudo apt-get install telegraf