Telegraf is an agent for collecting, processing, aggregating, and writing metrics.
The telegrapf repository is available here: Telegraf Repository and contains a number of plugins which can be included in your telegraf.conf file.
The following yaml file provides a sample configuration which uses telegraf and docker as input plugins and influx and influx_v2 as output plugins - telegraf.yaml
For the docker input plugin to work we must mount /var/run/docker.sock into our container, we also need to set the security context for the container. To do this follow the instructions below.
Change these values in your container if they are different from above.
Our metrics are being collected into the telegraf bucket.
We can now see the visualizations in the influx dashboard we imported using the community templates : Community Templates
Note: You'll need to configure each cell so it's retrieving the docker metrics from the correct bucket, in this case telegraf.