From 1f520da78cd03402fb7074522640acd7f84fc892 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sat, 28 Mar 2020 18:35:50 +0100 Subject: [PATCH] Fixed minor bug --- smart_array_disks_temperature | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/smart_array_disks_temperature b/smart_array_disks_temperature index 5c91896..2ffeaeb 100755 --- a/smart_array_disks_temperature +++ b/smart_array_disks_temperature @@ -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 }