mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Fixes quota für zvols. Without this, the log gets spammed with
> 2020/08/16 04:45:24 [ERROR] In RRD: Error updating /var/lib/munin/localdomain/localhost.localdomain-zfs_list_rpool__name-quota-g.rrd: /var/lib/munin/localdomain/localhost.localdomain-zfs_list_rpool__name-quota-g.rrd: Function update_pdp_prep, case DST_GAUGE - Cannot convert '-' to float
This commit is contained in:
parent
225a9156df
commit
aee6a15240
1 changed files with 7 additions and 1 deletions
|
@ -79,6 +79,12 @@ for i in `zfs list -Hp | awk '{print $1}'`; do
|
||||||
values=( $(zfs get -p usedbydataset,usedbychildren,usedbysnapshots,usedbyrefreservation,available,quota $i | awk 'BEGIN {total=0;} { if( NR==1 ) next; } !/quota/ {total=total+$3;} {print $3} END{print total;}') )
|
values=( $(zfs get -p usedbydataset,usedbychildren,usedbysnapshots,usedbyrefreservation,available,quota $i | awk 'BEGIN {total=0;} { if( NR==1 ) next; } !/quota/ {total=total+$3;} {print $3} END{print total;}') )
|
||||||
fsname=$(clean_fieldname $(echo "$i" | sed 's/\//__/g'))
|
fsname=$(clean_fieldname $(echo "$i" | sed 's/\//__/g'))
|
||||||
|
|
||||||
|
if [ ${values[5]} = "-" ]; then
|
||||||
|
quota=0
|
||||||
|
else
|
||||||
|
quota=${values[5]}
|
||||||
|
fi
|
||||||
|
|
||||||
echo <<EOF "multigraph zfs_list_$fsname
|
echo <<EOF "multigraph zfs_list_$fsname
|
||||||
usedbydataset.value ${values[0]}
|
usedbydataset.value ${values[0]}
|
||||||
usedbysnapshots.value ${values[2]}
|
usedbysnapshots.value ${values[2]}
|
||||||
|
@ -86,7 +92,7 @@ usedbychildren.value ${values[1]}
|
||||||
usedbyrefreservation.value ${values[3]}
|
usedbyrefreservation.value ${values[3]}
|
||||||
available.value ${values[4]}
|
available.value ${values[4]}
|
||||||
total.value ${values[6]}
|
total.value ${values[6]}
|
||||||
quota.value ${values[5]}"
|
quota.value $quota"
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue