dd-agent icon indicating copy to clipboard operation
dd-agent copied to clipboard

Docker daemon tag extending/improvement

Open opteemister opened this issue 9 years ago • 8 comments

**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: , /var/log/datadog/collector.log, syslog:/dev/log

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: , /var/log/datadog/dogstatsd.log, syslog:/dev/log

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: , /var/log/datadog/forwarder.log, syslog:/dev/log

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:

  1. Create docker image in AWS ECR
  2. Run docker image from the ECR
  3. 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.

opteemister avatar Dec 14 '16 11:12 opteemister

+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

idntfy avatar Dec 14 '16 11:12 idntfy

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?

hkaj avatar Dec 14 '16 13:12 hkaj

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.

opteemister avatar Dec 14 '16 13:12 opteemister

It is. We'll add it for both then.

hkaj avatar Dec 14 '16 13:12 hkaj

Thank you!

opteemister avatar Dec 14 '16 13:12 opteemister

Hi, @hkaj When will this be available?

jielingit avatar Dec 26 '17 23:12 jielingit

Hi @jielingit sorry for the delay here, it should be merged for 5.22.

hkaj avatar Jan 02 '18 13:01 hkaj

@hkaj Thanks! When will 5.22 be released?

jielingit avatar Jan 02 '18 18:01 jielingit