telegraf report "Cannot connect to the Docker daemon" afer telegraf enable input plugin docker

Bug #1722414 reported by MarginHu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Invalid
Undecided
Unassigned

Bug Description

Hi Guys,

telegraf have a input plugin "docker" which can monitor docker container activity or event in one host,I add config in telegraf.conf as following:

[[inputs.docker]]
interval = "60s"
endpoint = "unix:///var/run/docker.sock"
container_names = []
timeout = "30s"
perdevice = true
total = false

but found errors happened.

Running command: 'telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d/'
2017-10-09T14:04:09Z I! Starting Telegraf (version 1.2.1)
2017-10-09T14:04:09Z I! Loaded outputs: influxdb
2017-10-09T14:04:09Z I! Loaded inputs: inputs.haproxy inputs.disk inputs.diskio inputs.processes inputs.swap inputs.net inputs.cpu inputs.kernel inputs.mysql inputs.mem inputs.memcached inputs.elasticsearch inputs.rabbitmq inputs.system inputs.docker
2017-10-09T14:04:09Z I! Tags enabled: host=cloud-host-1
2017-10-09T14:04:09Z I! Agent Config: Interval:10s, Quiet:false, Hostname:"cloud-sz-control-b13-01.sz.cloud.genomics.cn", Flush Interval:10s
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
2017-10-09T14:04:10Z E! ERROR in input [inputs.docker]: Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Revision history for this message
Eduardo Gonzalez (egonzalez90) wrote :

Hi, you need to allow remote API connections to docker daemon.

Example of ExecStart systemd service for docker. The IP is the host IP or allow 0.0.0.0 to all IPs.

ExecStart=/usr/bin/dockerd -H tcp://192.168.100.244:2375 -H unix:///var/run/docker.sock

Regards

Changed in kolla:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.