Our application writes statsd metrics. We run this application inside a pod in a deployment in kubernetes. We’d like to use telegraf to collect these statsd metrics.
What’s the right way to do this?
Run telegraf in each pod, as a separate container with the application – if so, are there any examples on how to do this?
You could configure telegraf to be a statsd collector and forward the data on.
In some recent work where I was building an k8s job, I actually decided against statsd style metrics because I did not want aggregation. I wanted each and every stat. So, I changed the telegraf side car from being a statsd collect to a socket listener that took line protocol directly. I’m not suggesting you switch, but, with a sidecar you’ll get the freedom to iterate.