2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

[zpool_iostat] keep previous fieldnames

This commit is contained in:
Lars Kruse 2017-01-11 02:02:56 +01:00
parent aa9a39f043
commit 14fae65757

View File

@ -102,14 +102,14 @@ if [ "$ACTION" = "config" ]; then
# each device.
printf "graph_order"
echo "$zlist" | while read -r device_id; do
fieldname="$(get_device_fieldname "pool_$device_id")"
fieldname="$(get_device_fieldname "$device_id")"
printf " %s_read %s_write" "$fieldname" "$fieldname"
done
# finalize the 'graph_order' with a newline
echo
# output all fields: write as negative numbers and read as positive
echo "$zlist" | while read -r device_id; do
fieldname="$(get_device_fieldname "pool_$device_id")"
fieldname="$(get_device_fieldname "$device_id")"
echo "${fieldname}_read.label $device_id"
echo "${fieldname}_read.type GAUGE"
echo "${fieldname}_read.graph no"
@ -122,7 +122,7 @@ fi
echo "$zlist" | while read -r device_id; do
fieldname="$(get_device_fieldname "pool_$device_id")"
fieldname="$(get_device_fieldname "$device_id")"
echo "${fieldname}_read.value $(get_device_iostat_column "$device_id" 6)"
echo "${fieldname}_write.value $(get_device_iostat_column "$device_id" 7)"
done