docker-daemon を設定し、auto_conf を修正しました。%%host%% 変数を渡すにはどうすればよいですか?
sudo docker run -d --name dd-agent \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-e API_KEY=XXXXXXXXXXXXXXX \
-e SD_BACKEND=docker \
-e SD_CONFIG_BACKEND=etcd \
-e SD_BACKEND_HOST=XX.XXX.XX.XX \
-e SD_BACKEND_PORT=XXXX \
datadog/docker-dd-agent:latest
etcd.yaml を変更しました
docker_images:
- image1
init_config:
instances:
- url: "http://XX.XXX.XX.XX:XXXX"
しかし、私がやろうとすると
sudo docker exec -it dd-agent /etc/init.d/datadog-agent configcheck
2017-08-07 19:18:37,637 | WARNING | dd.collector | utils.service_discovery.abstract_sd_backend(abstract_sd_backend.py:66) | Failed to interpolate variable %%host%% for the url parameter. Dropping this configuration.
コレクターのログが表示されます
NotFound: 404 Client Error: Not Found ("No such image: sha256:6d13e6f1665c7abcd9edeba651a1f883ab68dbb73153d6cc55145add585373fc")
2017-08-08 17:16:11 UTC | ERROR | dd.collector | utils.dockerutil(dockerutil.py:548) | Exception getting docker image name
Traceback (most recent call last):
File "/opt/datadog-agent/agent/utils/dockerutil.py", line 533, in image_name_extractor
image_spec = self.client.inspect_image(image)
File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/docker/utils/decorators.py", line 21, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/docker/api/image.py", line 136, in inspect_image
self._get(self._url("/images/{0}/json", image)), True
File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/docker/client.py", line 178, in _result
self._raise_for_status(response)
File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/docker/client.py", line 173, in _raise_for_status
raise errors.NotFound(e, response, explanation=explanation)