Open thorgrimjansrud opened 1 year ago
Quick test on docker network that seemed to work:
CREATE NETWORK. docker network create tig-net --driver=bridge --subnet=10.10.10.0/16
RUN INFLUX: docker run -d --network=tig-net --restart unless-stopped --name influx -p 8086:8086 -e INFLUXDB_ADMIN_USER=admin -e INFLUXDB_ADMIN_PASSWORD=wago -e INFLUXDB_MONITOR_STORE_ENABLED=FALSE -v influx-vol-data:/var/lib/influxdb -v /home/edge/influxdb.conf:/etc/influxdb/influxdb.conf -v /home/edge/influxdb-init.iql:/docker-entrypoint-initdb.d/influxdb-init.iql influxdb:1.8 -config /etc/influxdb/influxdb.conf
RUN GRAFANA: docker run -d --network=tig-net --restart unless-stopped --name grafana -p 3000:3000 -v grafana-vol-data:/var/lib/grafana grafana/grafana:latest
RUN TELEGRAF: docker run -d --network=tig-net --restart unless-stopped --name telegraf --device=/dev/ttyUSB0:/dev/serial:rw -v /home/edge/telegraf.conf:/etc/telegraf/telegraf.conf:ro telegraf:latest
CONFIGURE INFLUX IN GRAFANA: http//influx:8086
TELEGRAF.CONF:
[[outputs.influxdb]] urls = ["http://influx:8086"]
[[outputs.websocket]] url = "ws://grafana:3000/api/live/push/telegraf_mid_data"
telegraf.conf: urls = ["http://127.0.0.1:8086"] database = "wagodb" [outputs.influxdb.namepass] namedrop = ["mid-1-l3-voltage"]
2023-02-23T13:21:56Z E! [outputs.influxdb] When writing to [http://127.0.0.1:8086]: failed doing req: Post "http://127.0.0.1:8086/write?db=wagodb": dial tcp 127.0.0.1:8086: connect: connection refused
From controller is ok: curl -G http://localhost:8086/query --data-urlencode "q=SHOW DATABASES" {"results":[{"statement_id":0,"series":[{"name":"databases","columns":["name"],"values":[["wagodb"]]}]}]}
Using public IP is ok: telegraf.conf: urls = ["http://192.168.3189:8086"]