When we first started using the v2 & telegraf input plugins, there was no problem, but restarting the system suddenly the getting this error ([inputs.docker] Error in plugin: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.21/containers/json?filters=%7B%22status%22%3A%5B%22running%22%5D%7D&limit=0”: dial unix /var/run/docker.sock: connect: permission denied) and now the InfluxDB 2.0 OSS Metrics & Docker data dashboards are not working… In the database we can see the respective tables are created but they are all empty.
How can we solve this error? Do the system need internet connection for these to work?
I tried it but didn’t work. In the given command I only replaced telegraf with my user.
still get this.
[inputs.docker] Error in plugin: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.21/containers/json?filters=%7B%22status%22%3A%5B%22running%22%5D%7D&limit=0”: dial unix /var/run/docker.sock: connect: permission denied
I installed telegraf directly from docker site. : sudo docker pull telegraf. Normaly telegraf is working fine, I mena it’s inserting data to influxdb uisng opcua but the internal docker & influxdb tables are all empty.
After running your command got the following msg:
ubuntu@ubuntu:~$ ls -l /var/run/docker.sock
srw-rwxrw- 1 root docker 0 Jan 10 07:36 /var/run/docker.sock