Fixed minor bug

This commit is contained in:
dbroqua 2020-03-28 18:35:50 +01:00
parent 5005ca3959
commit 1f520da78c

View File

@ -15,7 +15,7 @@ Maybe works with other HP Prolant Raid cards.
/etc/munin/plugin-conf.d/global or other file in that dir must contain:
[smart_array_disks_temperature*]
[smart_array_disks_temperature]
user root
=head1 NOTES
@ -57,13 +57,9 @@ getDisks () {
echo "${slot}${disk}CurrentTemperature(C).label (${disk}) ${diskName} "
else
diskDetails=`ssacli ctrl slot=${slot} pd ${disk} show detail|grep 'Current Temperature'`
temps="${diskDetails}"
for temp in ${temps[@]}; do
line="$(echo -e "${temp}" | tr -d '[:space:]'|sed -e "s/:/.value /g")"
temp=`ssacli ctrl slot=${slot} pd ${disk} show detail|grep 'Current Temperature'`
line="$(echo -e "${temp}" | tr -d '[:space:]'|sed -e "s/:/.value /g")"
echo ${slot}${disk}${line}
done
fi
done
}