Grafana+InfluxDB on Docker in Windows

I have got Docker.Desktop setup on Windows10 and installed in Docker both Grafana and Influxdb. The reside on the same host on the same hardware.

What I am trying to do is establish a connection to Influx from Grafana. I see there is a few other messages about this problem already - but none seemed to help.

The IP address here is the one I got for Influxdb from docker network inspect bridge . I was able to ping this IP from the docker for grafana, but not the other way as influxdb doesnt seem to have ping installed.

I have tried with and without “With Credentials”

I presume the Organisation is the Organisation ‘name’ not ‘ID’

Can you log into (with a browser) http://170.17.0.3:8086?

If yes, then which version do you see running? My guess is v2.7, and if so, here are some screenshots to get it working with InfluxQL.

Because it’s docker I dot think the host has access to that network.

how did you install both? using docker run or docker compose?

docker run

I found that I got it to go using query language Flux, but the instructions say I should use InfluxQL. The issue is when I change it to InfluxQL the connection fails again:

please share full docker commands you used for both grafana and influxdb also which docker image versions you used

It doesnt seem to give image version:

Windows unfortunatly does not remember command line history, but IIRC it was something like

docker run -d -p 3000:3000 --name=grafana grafana/grafana

the command to launch influx was similar with the names and ports changed.

Have you used docker in the past?

Dabbled in it -

you have the 170 ip prefix, why did you choose that? what is ip of grafana. what shared network are both containers in?

I would recommend for now, you try running grafana and influx outside of docker in windows itself running .exe

The 170 prefix is what’s assigned by the bridge network in Docker - its not something I setup. The shared network is the default bridge one.

I don’t really have the option of not using Docker in present environment.

1 Like

can you ping one from the other?

Yeyes ping works

1 Like

@bigalnz

Try testing the connectivity from Grafana to InfluxDB.

docker exec -it <grafana-container-name> sh

Then:

curl -v http://170.17.0.3:8086/health