Telegraf lxc/lxd stats

Hello all!

Could you please help me with advises… I want to collect stats from my lxc containers in hosts (using CPU, RAM for example). I did not find information how I can to do this. Have some plugin for this and dashbords for Grafana?

I found this telegraf-lxd-stats.go but it does not work :frowning:

Hello @quersys,
Sorry for the delay, I’m not sure. I’m asking around and I’ll get back to you. Thank you!

I think you can get what you are looking for using the cgroups input.

LXC is based on cgroups so each LXC container has an entry in /sys/fs/cgroups. You will need to identify which cgroups you want to monitor (cgroup plugin’s paths setting) and the metrics you are interested in (cgroup plugin’s files setting).

The metrics are described in the man page for cgroups.

I’m not aware of an existing grafana dashboard for this data.