robinmanuelthiel / speedtest

Check internet bandwidth from a Docker container and save the results to an InfluxDB
MIT License
169 stars 48 forks source link

"Unauthorized" when saving to DB #9

Closed outofsight closed 1 year ago

outofsight commented 1 year ago

Hello,

Started with docker-compose template but I get some error when saving to db.

Your download speed is 78 Mbps (9834665 Bytes/s).
Your upload speed is 9 Mbps (1215241 Bytes/s).
Your ping is 12.346 ms.
Saving values to database...
{"code":"unauthorized","message":"Unauthorized"}{"code":"unauthorized","message":"Unauthorized"}{"code":"unauthorized","message":"Unauthorized"}Values saved.

Any idea?

robinmanuelthiel commented 1 year ago

Probably an issue with the version? Can you try this file?

version: "3"
services:
  grafana:
    image: grafana/grafana:7.5.2
    restart: always
    ports:
      - 3000:3000
    volumes:
      - grafana:/var/lib/grafana
    depends_on:
      - influxdb

  influxdb:
    image: influxdb:1.8.3
    volumes:
      - influxdb:/var/lib/influxdb
    ports:
      - 8083:8083
      - 8086:8086
    environment:
      - INFLUXDB_ADMIN_USER="admin"
      - INFLUXDB_ADMIN_PASSWORD="password"
      - INFLUXDB_DB="speedtest"

  speedtest:
    image: robinmanuelthiel/speedtest:latest
    environment:
      - LOOP=true
      - LOOP_DELAY=1800
      - DB_SAVE=true
      - DB_HOST=http://influxdb:8086
      - DB_NAME=speedtest
      - DB_USERNAME=admin
      - DB_PASSWORD=password
    privileged: true # Needed for 'sleep' in the loop
    depends_on:
      - influxdb

volumes:
  grafana:
  influxdb:
robinmanuelthiel commented 1 year ago

Closed due to inactivity.