You need to install Ookla's version of speedtest-cli and NOT the unofficial python tool.
/etc/zabbix/bin
: mkdir -p /etc/zabbix/bin
zbx-speedtest.sh
to /etc/zabbix/bin
chmod +x /etc/zabbix/bin/zbx-speedtest.sh
cp systemd/{zabbix-speedtest.service,zabbix-speedtest.timer} /etc/systemd/system
systemctl enable --now zabbix-speedtest.timer
cp zabbix_agentd.d/speedtest.conf /etc/zabbix/zabbix_agentd.conf.d
systemctl restart zabbix-agent
template_speedtest.xml
on your Zabbix server/etc/zabbix/bin
: mkdir -p /etc/zabbix/bin
zbx-speedtest-debian.sh
to /etc/zabbix/bin/zbx-speedtest.sh
chmod +x /etc/zabbix/bin/zbx-speedtest.sh
cp systemd/{zabbix-speedtest-debian.service,zabbix-speedtest.timer} /etc/systemd/system; mv /etc/systemd/system/zabbix-speedtest{-debian,}.service
systemctl enable --now zabbix-speedtest.timer
cp zabbix_agentd.d/speedtest.conf /etc/zabbix/zabbix_agentd.conf.d
systemctl restart zabbix-agent
template_speedtest.xml
on your Zabbix server$PATH
zbx-speedtest.sh
to /etc/zabbix_agentd.conf.d/bin
chmod +x /etc/zabbix_agentd.conf.d/bin/zbx-speedtest.sh
cp zabbix_agentd.d/speedtest.openwrt.conf /etc/zabbix_agentd.conf.d
/etc/init.d/zabbix-agentd restart
crontab -e
-> Add the content of systemd/speedtest.crontab
template_speedtest.xml
on your Zabbix serverCheck out pschmitt/speedtest:cron on Docker Hub
zbx-speedtest.sh
inside your zabbix-agent containerBelow is an example docker-compose.yaml
.
NOTE: pschmitt/zabbix-agent2 contains jq which is required by zbx-speedtest.sh
.
---
version: "3.7"
services:
speedtest:
image: pschmitt/speedtest:cron
volumes:
- "./data/speedtest:/data"
environment:
- INTERVAL=300
zabbix-agent:
image: pschmitt/zabbix-agent2:latest
restart: unless-stopped
hostname: ${HOSTNAME}
privileged: true
network_mode: host
pid: host
volumes:
- "./config/bin:/zabbix/bin:ro"
- "./config/zabbix_agentd.d:/etc/zabbix/zabbix_agentd.d:ro"
- "./data/speedtest:/data/speedtest:ro"
environment:
- ZBX_HOSTNAMEITEM=system.hostname
- ZBX_SERVER_HOST=zabbix.example.com