Docker daemon tag extending/improvement
**Output of the info page **
=================== Collector (v 5.9.1)
Status date: 2016-12-02 15:30:17 (71512s ago)
Pid: 20277
Platform: Linux-3.16.0-4-amd64-x86_64-with-debian-8.4
Python Version: 2.7.12, 64bit
Logs:
Clocks
NTP offset: 0.0106 s
System UTC time: 2016-12-14 11:22:10.535332
Paths
conf.d: /etc/dd-agent/conf.d
checks.d: /opt/datadog-agent/agent/checks.d
Hostnames
ec2-hostname: ip-10-0-100-35.us-west-2.compute.internal
local-ipv4: 10.0.100.35
local-hostname: ip-10-0-100-35.us-west-2.compute.internal
socket-hostname: ip-10-0-100-35
hostname: ip-10-0-100-35.us-west-2.compute.internal
instance-id: i-04424e1363741d8f5
socket-fqdn: ip-10-0-100-35.us-west-2.compute.internal
Checks
network
-------
- instance #0 [OK]
- Collected 39 metrics, 0 events & 1 service check
process
-------
- instance #0 [OK]
- instance #1 [OK]
- instance #2 [OK]
- Collected 33 metrics, 0 events & 4 service checks
ntp
---
- Collected 0 metrics, 0 events & 1 service check
disk
----
- instance #0 [OK]
- Collected 40 metrics, 0 events & 1 service check
docker_daemon
-------------
- instance #0 [OK]
- Collected 81 metrics, 1 event & 2 service checks
Emitters
- http_emitter [OK]
=================== Dogstatsd (v 5.9.1)
Status date: 2016-12-14 11:22:07 (3s ago)
Pid: 8146
Platform: Linux-3.16.0-4-amd64-x86_64-with-debian-8.4
Python Version: 2.7.12, 64bit
Logs:
Flush count: 21249 Packet Count: 0 Packets per second: 0.0 Metric count: 1 Event count: 0 Service check count: 0
=================== Forwarder (v 5.9.1)
Status date: 2016-12-14 11:22:09 (2s ago)
Pid: 8145
Platform: Linux-3.16.0-4-amd64-x86_64-with-debian-8.4
Python Version: 2.7.12, 64bit
Logs:
Queue Size: 0 bytes Queue Length: 0 Flush Count: 62252 Transactions received: 21248 Transactions flushed: 21248 Transactions rejected: 0
Additional environment details (Operating System, Cloud provider, etc):
Linux Ubuntu and Amazon Linux, AWS
Steps to reproduce the issue:
- Create docker image in AWS ECR
- Run docker image from the ECR
- Collect metrics through the docker_daemon checker
Describe the results you received: Tag docker_image looks like this "{aws_account_id}.dkr.ecr.{aw_region}.amazonaws.com/{container_name}:{image_tag}" It is very long string. And if ECR (repository url) is the same for all containers it is hard to determine them.
Describe the results you expected: Something like this: "{container_name}:{image_tag}" Shorter and simple. Maybe additional tag "container_name" instead of changing the "docker_image" tag
Additional information you deem important (e.g. issue happens only occasionally): I understand that it is not common problem. But it would be great to have tag with simple container name.
+1
it would be convenient if it could be configurable using docker_daemon.yaml, for example, by having simple boolean field that could omit docker repo name, or, by defining some regexp-like converter
Hi @opteemister Thanks for the detailed report. When you say container name you mean the image name but without the docker repository right? Because we already have a container_name tag which is (erm) the container name.
We could add a short_image_name tag that would strip the repo, and make it available here. Would that work for you?
Hi, @hkaj
Yes, you are right I meant image name without docker repository. It would be great to have short_image_name. But not for Performance metrics. For this https://github.com/DataDog/dd-agent/blob/5.10.1/conf.d/docker_daemon.yaml.example#L125 We use these tags for docker.containers.running metric. I think that metric is in that part.
Thank you.
It is. We'll add it for both then.
Thank you!
Hi, @hkaj When will this be available?
Hi @jielingit sorry for the delay here, it should be merged for 5.22.
@hkaj Thanks! When will 5.22 be released?