mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 18:07:20 +00:00
fixed some critical mistakes which caused the plugin to work on the command line but not when called from munin
This commit is contained in:
parent
0767fa14ba
commit
72e075ba03
1 changed files with 5 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
DISK="${0/*smart-by-id_/}"
|
||||
SMARTCTL="smartctl $SMARTOPTS"
|
||||
DISK=${0/*smart-by-id_/}
|
||||
SMARTCTL="`which smartctl | head -1` $SMARTOPTS"
|
||||
|
||||
echo "# $DISK"
|
||||
|
||||
|
@ -28,7 +28,7 @@ config)
|
|||
OL=`echo -n ${OP[1]} | tr '_' ' '`
|
||||
echo ${ON}.label ${OL}
|
||||
echo ${ON}.draw LINE2
|
||||
echo ${ON}.critical $((${OP[5]})):
|
||||
echo ${ON}.critical ${OP[5]}:
|
||||
done
|
||||
;;
|
||||
suggest)
|
||||
|
@ -45,7 +45,8 @@ suggest)
|
|||
if [ $((SES & 224)) -gt 0 ] ; then SES=1 ; fi
|
||||
fi
|
||||
echo "smartctl_exit_class.value $SES"
|
||||
$SMARTCTL -A /dev/disk/by-id/$DISK | awk '/0x/ { gsub(/[^a-Z0-9]/,"_",$2); print $2.".value",$4; }'
|
||||
$SMARTCTL -A /dev/disk/by-id/$DISK | awk '/0x/ { gsub(/[^a-zA-Z0-9]/,"_",$2); print $2.".value",$4; }'
|
||||
;;
|
||||
esac
|
||||
|
||||
#exit 0
|
Loading…
Add table
Add a link
Reference in a new issue