so I installed influxdb using docker this weekend and one of the things I noticed that I don’t seem to be able to make openhab connect to the influxdb through a docker alias.
I created a network “influxdb” and added it to the influxdb container with an alias “influxdatabase”, OpenHAB is on the same network, when configuring influxdb.cfg with:
url=http://influxdatabase:8086
Openhab (and Chronograf as well) spit outs a “cannot resolve host influxdatabase” error.
As OpenHAB and Chronograf both can’t access the influxdb through the alias this is more of a docker config issue then a OpenHAB issue. Yet I know some people are running their influxdb in docker as well and was wondering how they got this configured?
Note: when I configure the host ip “192.168.1.30” and expose the influxdb port to the outside world everything works fine. Yet it should be possible to keep this in the docker backend and to keep things a bit more secure
PS: I’m using a cofnfiguration with a backend network and alias for my mqtt setup and this works fine. No idea why it gives problems for influxdb
Big difference might be that I run OpenHAB with net=host (in order to fetch broadcast/multicast messages). If you do not want to run it on the machine’s network, just try the link attribute, the same way I did between grafana and influx container.
Thanks, the grafana stuff will definitely help me to setup grafana in the future :slight_smile
So, I had a look at the link flag and it seems that it’s legacy and might get removed in the future so I prefer not to use it… I’ll check if I can find some assistance on the influxdb forum perhaps. To be continued!