influxdata / influxdata/telegraf
inputs.internet_speed: upload speed severely under-reported in v1.40.0
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Relevant telegraf.conf
```toml
# Test internet speed
[[inputs.internet_speed]]
interval = "1h"
collection_offset = "45m"
memory_saving_mode = false
test_mode = "multi"
```
### Logs from Telegraf
```text
No errors or warnings are logged, even with --debug. The plugin gathers and writes metrics successfully; only the value of the `upload` field is wrong.
```
### System info
Telegraf 1.40.0, Docker 29.8.0, Debian 13 Trixie
### Docker
_No response_
### Steps to reproduce
1. Run `[[inputs.internet_speed]]` on a host whose real upload is well above the reported value (e.g. a ~100+ Mbps connection).
2. Record the `upload` field on Telegraf **1.39.x**.
3. Upgrade to Telegraf **1.40.0** and record the `upload` field again for the same host/link.
4. Compare: `download` is unchanged and correct, but `upload` drops substantially.
Observed here: real upload >100 Mbps, reported upload ~28 Mbps; download reported ~118 Mbps and correct.
### Expected behavior
The `upload` field should reflect actual upload throughput, consistent with pre-**1.40.0** results and with browser/CLI speedtest runs from the same host.
### Actual behavior
The `upload` field is significantly under-reported. The `download` field is unaffected.
### Additional info
v**1.40.0** bumped github.com/showwin/speedtest-go from **1.7.10** to **1.8.2** (via #19425 and #19596). The upload measurement changed in speedtest-go PR showwin/speedtest-go#267 ("fix(upload): count only confirmed request bytes").
Contributor guide
Research direction
Start at the [[inputs.internet_speed]] entry point and inspect the github.com/showwin/speedtest-go upgrade from 1.7.10 to 1.8.2, especially the upload measurement change in PR #267. Reproduce on the same host with Telegraf 1.39.x and 1.40.0, then verify that upload no longer under-reports while download remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100