fluent-plugin-docker-metrics
fluent-plugin-docker-metrics copied to clipboard
"name" field should be basename, which doesn't include link information
trafficstars
When we link some containers with another, sometimes this plugin generate fields which are dfficult to deal with (like containerA/containerB).
As shown in the following sample, this happens for a reason of using Docker::Container.info method.
With using Docker::Container.json, we can get basename of containers.
Docker::Container.all.map{|container| container.info['Names'] }
=> [["/fluentd"], ["/fluentd/norikra", "/norikra"]]
Docker::Container.all.map{|container| container.json['Name'] }
=> ["/fluentd", "/norikra"]
@funkymonkeymonk is the main maintainer now. What do you think, @funkymonkeymonk?
I agree though this could break some workflows. Maybe there needs to be a name tag and a base name tag.