wociscz / lxd-telegraf-stats

LXD containers metrics
24 stars 14 forks source link

KeyError: 'cpuprio' #2

Closed Sn0ff closed 4 years ago

Sn0ff commented 4 years ago

Hi I try to run scriptn lxd-telegraf-stats.py and i get an error

File "/usr/local/sbin/lxd-telegraf-stats.py", line 299, in output.append(header + ",metric=status running=" + str(metric['running']) + ",processes=" + str(metric['processes']) + ",cpuprio=" + str(metric['cpuprio']) + ",hddprio=" + str(metric['hddprio'])) KeyError: 'cpuprio'

please help find the problem

Thanks

wociscz commented 4 years ago

Hi, which version of lxd are running? I've tried 3.17 (snap version) on ubuntu 18.04 and it works as expected without errors. Looks like sometime there are missing cgroup values for blkio.weight and/or cpu.shares

I'll push workaround for that.