diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-08-04 21:13:43 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-08-04 21:13:43 +0200 |
commit | cdcc2548ed2b99bdef8c22e206bc003f7c4e785a (patch) | |
tree | 37abf9ff618bbc546be456860e30f47280c774dd /chaos-at-home/ch-prometheus.yml | |
parent | ch-epimetheus: replace disk (diff) |
nice dstat.sh script for ch-promethues and ch-epimetheus
Diffstat (limited to 'chaos-at-home/ch-prometheus.yml')
-rw-r--r-- | chaos-at-home/ch-prometheus.yml | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chaos-at-home/ch-prometheus.yml b/chaos-at-home/ch-prometheus.yml index 62550788..f0545d26 100644 --- a/chaos-at-home/ch-prometheus.yml +++ b/chaos-at-home/ch-prometheus.yml @@ -49,4 +49,13 @@ mode: 0755 content: | #!/bin/bash - exec dstat -cnd -N enp47s0,bond0 -D nvme0n1,nvme1n1,sda,sdb,sdc --disk-util --top-io --top-bio + {% set disk_variables = [] %} + {% for disk in install.disks.raid.members %} + disk_primary{{ loop.index0 }}=$(basename $(realpath '{{ install.disks.primary }}')) + {{ disk_variables.append('$disk_primary'+(loop.index0| string)) -}} + {% endfor %} + {% for name,volume in luks_volumes.items() %} + disk_{{ name | replace('-', '_') }}=$(basename $(realpath '{{ volume.device }}')) + {{ disk_variables.append('$disk_'+(name | replace('-', '_'))) -}} + {% endfor %} + exec dstat -cnd -N {{ network.primary.name }} -D "{{ disk_variables | join(',') }}" --disk-util --top-io --top-bio |