Hello, I’ve been trying to create myself a raspberry pi temperature sensor and with some of the excellent articles out there, I’ve got to the point where it seems I am nearly complete.
I have been following this guide: GitHub - WesleyCharlesBlake/raspberry-pi-temperature: OneWire temp logger on RPI, with a remote Grafana and InfluxDB stack deployed with Docker
I have created my Ubuntu server VM, installed Docker and ran the following commands to get the containers created, but for some reason, I cannot get Grafana to connect to InfluxDB.
My settings are as follows:
-
Name:Grafana
-
Access: Server
-
Nothing enabled for Auth
InfluxDB details: Database: dbname user: user password: pass
Now, my Raspberry Pi is running the python script and outputting a temperature. I have configured the Pi script with the following:
- influx_host = ‘10.16.61.59’
- host = ‘grafana’
- port = 8086
- dbname = ‘dbname’
- user = ‘user’
- password = ‘pass’
- temp_sensor = ‘/sys/bus/w1/devices/28-0113136957aa/w1_slave’
Whenever I try to Save and Test the datasource, I am getting:
*Network Error: Bad Gateway (502)
I’ve done a bit of searching and can’t seem to identify why it will not connect to the InfluxDB.
When I try to save and Test, I get this output from my Docker VM:
grafana_1 | 2019/01/07 20:29:39 http: proxy error: dial tcp 127.0.0.1:8086: connect: connection refused grafana_1 | t=2019-01-07T20:29:39+0000 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/api/datasources/proxy/1/query status=502 remote_addr=10.16.12.21 time_ms=15 size=0 referer=http://10.16.61.59:3000/datasources/edit/1
It seems that Influx is refusing my connection?
Does anybody know what may be wrong?
Thank you