Hi, new user here. I am getting Telegraf set up on a Raspberry Pi and I would like to connect to an InfluxDB server on the local network using a “.local” address. This is all pretty unfamiliar to me and I am just learning, but I will describe the problem as best I can.
The InfluxDB server is running fine, the Pi resolves the “.local” address of the server using commands like ping and I can perform queries to the server from the Pi using curl, e.g.:
curl -G ‘http://david-desktop.local:8086/query?pretty=true’ --data-urlencode “db=_internal” --data-urlencode “q=SELECT * FROM runtime” > test.txt
But when I start up telegraf, I get the following:
2017/04/19 00:27:16 I! Using config file: /etc/telegraf/telegraf.conf
2017-04-19T04:27:16Z E! Database creation failed: Post http://david-desktop.local:8086/query?db=&q=CREATE+DATABASE+"telegraf": dial tcp: lookup david-desktop.local on 192.168.1.1:53: no such host
It appears to be trying to resolve the domain name using the /etc/resolv.conf file, which I confirmed by manually changing the IP address for the name server in the file and saw that the corresponding text in the error message would change.
A bit of homework suggests that this might be due to the Go language DNS resolver not handling these types of addresses (see “name resolution” in https://golang.org/pkg/net/). The documentation says that it should try a different (C based) resolver in these cases, but perhaps this isn’t happening? Any ideas?
Thank you for your help!