Bad gateway error on Grafana while linking InfluxDB

Hello, I have docker containers running for InfluxDB (v2.3.0+SNAPSHOT.090f681737) at post 8086, and Grafana running on docker container with port 3000.

(base) qqq@qqq influx_test % docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
48d284356cd1 grafana/grafana “/run.sh” 2 days ago Up 4 hours 0.0.0.0:3000->3000/tcp grafana
ce98e41259d3 influxdb:latest “/entrypoint.sh infl…” 3 days ago Up 4 hours 0.0.0.0:8086->8086/tcp influx
deffabed23fc mysql:latest “docker-entrypoint.s…” 4 days ago Up 4 hours 0.0.0.0:3306->3306/tcp, 33060/tcp test-mysql

I am trying to set up Influx for my grafana dashboard, but getting “Bad Gateway error”. ?Tried a couple of things that found on Google like.

  1. Setting up InfluxDB v2 (Flux) with InfluxQL in Grafana | by Ivana Huckova | Medium
  2. Used “Network IP” of Grafana/InfluxDB in the attached window space instead of “localhost” which is retrieved through command "docker inspect grafana/influx (container names). However, I am still not able to get it connected when influx is storing data to appropriate bucket.

I would be extremely helpful for pointers on this. Thank you very much in advance

Hi @priyaarorapinnacle ,

Welcome to the :grafana: community forum !!

Which IP are you defining in the data source? because If you e.g. running docker containers on a VM, then you need to write the IP of the VM (not the docker)

You can view the IP via the command ip a and it should be something like eth0

For