Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include container id in docker_daemon metrics #2353

Closed
ejholmes opened this issue Mar 15, 2016 · 6 comments
Closed

Include container id in docker_daemon metrics #2353

ejholmes opened this issue Mar 15, 2016 · 6 comments
Milestone

Comments

@ejholmes
Copy link
Contributor

Currently, the docker_daemon check does not include the container id as a tag in the metrics that are generated. Including this would be a great addition. Adding it would be pretty straightforward, but I'm not sure if there was any reasoning behind not including it in the first place.

@olivielpeau
Copy link
Member

Hi @ejholmes and thanks for opening this issue!

We recommend using a combination of the image_name and the image_tag tags to identify the containers.

Basically we want to avoid tagging the metrics by container ID as it would create a lot of different (and possibly short-lived) sets of tags for each metric, which would put some stress on our backend while (as far as we know) not adding much value in terms of usability.

Do you have a use-case where using the image_name and the image_tag tags does not work well?

@ejholmes
Copy link
Contributor Author

@olivielpeau understandable. Basically, our use case is that image_name and image_tag aren't suitable for uniquely identifying a single container. We have other systems that report the container id, so this would mostly help us correlate with those systems.

We're using ECS, so in theory we're already creating a lot of short lived container_name's (sorry! :)).

@olivielpeau
Copy link
Member

Thanks @ejholmes, we'll discuss this internally and see if/how we could add this tag. Will keep you updated!

@olivielpeau olivielpeau added this to the Triage milestone Mar 25, 2016
@remh
Copy link

remh commented Mar 25, 2016

@ejholmes I think you can just edit this line https://github.com/DataDog/dd-agent/blob/master/conf.d/docker_daemon.yaml.example#L105 and add "container_id" to it to collect the container_id as a tag. Let us know how it goes and feel free to reopen if it doesn't work!

@remh remh closed this as completed Mar 25, 2016
@ejholmes
Copy link
Contributor Author

@remh thanks for the heads up, but it looks like there's no tag extractor for container_id. Would you guys accept a PR if container_id is disabled by default?

@remh remh reopened this May 16, 2016
@remh remh modified the milestones: 5.8.0, Triage May 16, 2016
@remh
Copy link

remh commented May 16, 2016

Sorry for the delay @ejholmes . Just created a PR to add an extractor for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants