Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Dynamic items or Dictionnary items #102

Open
benoitjpnet opened this issue Feb 3, 2021 · 0 comments
Open

Feature request: Dynamic items or Dictionnary items #102

benoitjpnet opened this issue Feb 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@benoitjpnet
Copy link

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) }' 
@sqshq sqshq added the enhancement New feature or request label Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants