Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internet-speed reports negative packetloss #16279

Open
andrasg opened this issue Dec 9, 2024 · 1 comment
Open

internet-speed reports negative packetloss #16279

andrasg opened this issue Dec 9, 2024 · 1 comment
Labels
bug unexpected problem or unintended behavior

Comments

@andrasg
Copy link

andrasg commented Dec 9, 2024

Relevant telegraf.conf

# Monitors internet speed using speedtest.net service
[[inputs.internet_speed]]
  ## This plugin downloads many MB of data each time it is run. As such
  ## consider setting a higher interval for this plugin to reduce the
  ## demand on your internet connection.
   interval = "480m"

  ## Enable to reduce memory usage
  # memory_saving_mode = false

  ## Caches the closest server location
  # cache = false

  ## Number of concurrent connections
  ## By default or set to zero, the number of CPU cores is used. Use this to
  ## reduce the impact on system performance or to increase the connections on
  ## faster connections to ensure the fastest speed.
  # connections = 0

  ## Test mode
  ## By default, a single sever is used for testing. This may work for most,
  ## however, setting to "multi" will reach out to multiple servers in an
  ## attempt to get closer to ideal internet speeds.
   test_mode = "multi"

  ## Server ID exclude filter
  ## Allows the user to exclude or include specific server IDs received by
  ## speedtest-go. Values in the exclude option will be skipped over. Values in
  ## the include option are the only options that will be picked from.
  ##
  ## See the list of servers speedtest-go will return at:
  ##     https://www.speedtest.net/api/js/servers?engine=js&limit=10
  ##
  # server_id_exclude = []
   server_id_include = [ "2073" ]

Logs from Telegraf

2024-12-09T21:21:12Z I! Loading config: /etc/telegraf/telegraf.conf
2024-12-09T21:21:12Z I! Loading config: /etc/telegraf/telegraf.d/in_speedtest.conf
2024-12-09T21:21:12Z I! Loading config: /etc/telegraf/telegraf.d/out_influxv2.conf
2024-12-09T21:21:12Z W! Agent setting "logtarget" is deprecated, please just set "logfile" and remove this setting! The setting will be removed in v1.40.0.
2024-12-09T21:21:12Z I! Starting Telegraf 1.32.3 brought to you by InfluxData the makers of InfluxDB
2024-12-09T21:21:12Z I! Available plugins: 235 inputs, 9 aggregators, 32 processors, 26 parsers, 62 outputs, 6 secret-stores
2024-12-09T21:21:12Z I! Loaded inputs: internet_speed
2024-12-09T21:21:12Z I! Loaded aggregators:
2024-12-09T21:21:12Z I! Loaded processors:
2024-12-09T21:21:12Z I! Loaded secretstores:
2024-12-09T21:21:12Z I! Loaded outputs: influxdb_v2
2024-12-09T21:21:12Z I! Tags enabled:
2024-12-09T21:21:12Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"", Flush Interval:10s
2024-12-09T21:21:12Z D! [agent] Initializing plugins
2024-12-09T21:21:12Z D! [agent] Connecting outputs
2024-12-09T21:21:12Z D! [agent] Attempting connection to [outputs.influxdb_v2]
2024-12-09T21:21:12Z D! [agent] Successfully connected to outputs.influxdb_v2
2024-12-09T21:21:12Z D! [agent] Starting service inputs
2024-12-09T21:21:22Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2024-12-09T21:21:32Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2024-12-09T21:21:42Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2024-12-09T21:21:52Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics

System info

Ubuntu 24.04.1 LTS, docker 27.3.1, telegraf 1.32.3 in docker

Docker

name: 'telegraf-speedtest'

services:
  telegraf-speedtest:
    image: 'telegraf'
    container_name: telegraf-speedtest
    restart: unless-stopped
    volumes:
      - /docker-data/telegraf-speedtest/config/telegraf.conf:/etc/telegraf/telegraf.conf
      - /docker-data/telegraf-speedtest/config/telegraf.d/:/etc/telegraf/telegraf.d/
    environment:
      - TZ=Europe/Amsterdam

Steps to reproduce

  1. configure telegraf docker with speedtest input and influxv2 output
  2. have telegraf run for a while
  3. observe negative packet loss values in influx

Expected behavior

Packetloss displays realistic values. My environment is stable, rarely experiencing any packetloss.

Actual behavior

Consistently seeing negative values for packetloss in influx. Not able to reproduce any packetloss with speedtest-cli.

image

Additional info

No response

@andrasg andrasg added the bug unexpected problem or unintended behavior label Dec 9, 2024
@r3inbowari
Copy link
Contributor

r3inbowari commented Dec 18, 2024

Hi, @andrasg, sorry for the late reply. Is this OK in single mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants