Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
mtominsk
Very useful plugin. Because Synology changed the way how spare disks are handled, I had to make some changes regarding the "initialized" Status which is interpreted as critical. Here are my changes on your script, maybe useful for one or two:
if [ "${diskStatus[$i]}" != "1" ] && [ "${diskStatus[$i]}" != "2" ] ; then
# if [ "${diskStatus[$i]}" = "2" ] ; then diskStatus[$i]="Initialized"; fi
if [ "${diskStatus[$i]}" = "3" ] ; then diskStatus[$i]="NotInitialized"; fi
if [ "${diskStatus[$i]}" = "4" ] ; then diskStatus[$i]="SystemPartitionFailed"; fi
if [ "${diskStatus[$i]}" = "5" ] ; then diskStatus[$i]="Crashed"; fi
healthStatus=2
healthString="$healthString, problem with ${diskID[$i]} (model:${diskModel[$i]}) status:${diskStatus[$i]} temperature:${diskTemp[$i]} C "
elif [ "${diskStatus[$i]}" = "2" ] ; then diskStatus[$i]="Initialized";
else
diskStatus[$i]="Normal"
fi
if [ "$verbose" = "yes" ] ; then echo "${diskID[$i]} (model:${diskModel[$i]}) status:${diskStatus[$i]} temperature:${diskTemp[$i]} C" ; fi
done
if [ "${diskStatus[$i]}" != "1" ] && [ "${diskStatus[$i]}" != "2" ] ; then
# if [ "${diskStatus[$i]}" = "2" ] ; then diskStatus[$i]="Initialized"; fi
if [ "${diskStatus[$i]}" = "3" ] ; then diskStatus[$i]="NotInitialized"; fi
if [ "${diskStatus[$i]}" = "4" ] ; then diskStatus[$i]="SystemPartitionFailed"; fi
if [ "${diskStatus[$i]}" = "5" ] ; then diskStatus[$i]="Crashed"; fi
healthStatus=2
healthString="$healthString, problem with ${diskID[$i]} (model:${diskModel[$i]}) status:${diskStatus[$i]} temperature:${diskTemp[$i]} C "
elif [ "${diskStatus[$i]}" = "2" ] ; then diskStatus[$i]="Initialized";
else
diskStatus[$i]="Normal"
fi
if [ "$verbose" = "yes" ] ; then echo "${diskID[$i]} (model:${diskModel[$i]}) status:${diskStatus[$i]} temperature:${diskTemp[$i]} C" ; fi
done