This is a docker container which runs a prometheus exporter to collect speedtest data using the official Speedtest CLI and script_exporter. The billimek/prometheus-speedtest-exporter docker image is multi-arch supporting amd64, arm7, and arm64.
The script_exporter needs to be passed the script name as a parameter (script). It is advised to use a long scrape_interval
to avoid excessive bandwidth use.
Example config:
scrape_configs:
- job_name: 'speedtest'
metrics_path: /probe
params:
script: [speedtest]
static_configs:
- targets:
- 127.0.0.1:9469
scrape_interval: 60m
scrape_timeout: 90s
- job_name: 'script_exporter'
metrics_path: /metrics
static_configs:
- targets:
- 127.0.0.1:9469
If running in kubernetes, there is a helm chart leveraging this with a built-in ServiceMonitor
for an autoconfigured solution: https://github.com/billimek/billimek-charts/tree/master/charts/speedtest-prometheus
Included is an example grafana dashboard as shown in the screenshot above.