docker-collectd-plugin
docker-collectd-plugin copied to clipboard
Added support for labels
Labels are Docker's way of adding custom metadata to containers and images. They can be applied at image build or at runtime. They are exposed via the Docker API in the containers call.
This PR adds those labels to container as container['Labels']. They are then parsed and appended to the plugin_instance value, for example:
:plugin_instance redis[app2.test=bob,application.test.test.test=tornado]
Given that collectd only has a 64 character limit for values this isn't ideal but is a fast way to allow us to expose a Docker container's metadata.