-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Docker Plugin] add server hostname for each docker measurements #1599
Conversation
@aaronjheng I'm not sure this is a good idea. By default docker randomizes the name of the container, which means that every launched container will have a new name and the potential series cardinality is infinite. When talking about influxdb, the database can't handle an infinite number of possible tag/value combinations. You will need to workaround this using docker labels or other means. |
@sparrc Thanks for replying. What I want to record is the host of docker engine, not the container. |
I see, maybe I'm misunderstanding something then, is that different than the built-in telegraf |
Yes. In my use case, the telegraf program and the target docker-engine are in different servers. So the built-in telegraf host tag is not the docker-engine's host.
I can't find any specific description about this Info struct. But after digging some source code. I find this https://github.com/docker/docker/blob/master/daemon/info.go:
So, I assume that info.Name means the hostname of the docker engine's host. |
Ping |
Looks good to me, but can you make the tag more descriptive? I'd suggest |
Sounds great! In docker context, |
* add server hostname for each docker measurements * update CHANGELOG * move feature to v1.1 * tweak docker_engine_host tag
Required for all PRs: