Telegraf in docker

How to collect the host metric of cpu and mem when i install telegraf use docker image

This should answer your question: