sampler
sampler copied to clipboard
Feature request: Dynamic items or Dictionnary items
Supposedly you have something like :
items:
- label: toots
sample: systemd-cgtop -m -1 -b -r --depth=1| grep lxc.payload.toots | awk '{ print int($4/1024/1024) }'
- label: cloud
sample: systemd-cgtop -m -1 -b -r --depth=1| grep lxc.payload.cloud | awk '{ print int($4/1024/1024) }'
- label: photos
sample: systemd-cgtop -m -1 -b -r --depth=1| grep lxc.payload.photos | awk '{ print int($4/1024/1024) }'
I would like to have ability to either dynamic get items and labels.
systemd-cgtop -m -1 -b -r --depth=1| grep lxc.payload. | awk '{ print $1, int($4/1024/1024) }'
lxc.payload.toots 1394
lxc.payload.cloud 375
lxc.payload.git 347
Automatically get label with $1, and value with $2.
Or having a dict.
items: ['toots', 'cloud', 'photos']
- label: {{ items }}
sample: systemd-cgtop -m -1 -b -r --depth=1| grep lxc.payload.{{ items }} | awk '{ print int($4/1024/1024) }'