Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
marko.itaf
bymarko.itaf, December 13, 2017
For anybody else who has a problem with the correct volume usage reporting, open the script and replace the line 317:
storageID[$i]=$(echo "$syno_diskspace" | grep "= "?/${storageName[$i]}$"?" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev)
with this:
storageID[$i]=$(echo "$syno_diskspace" | grep "= "/${storageName[$i]}"" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev)
and you should now get the correct volume usage (in percent) and the correct return state (depending on your -w and -c parameters).
storageID[$i]=$(echo "$syno_diskspace" | grep "= "?/${storageName[$i]}$"?" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev)
with this:
storageID[$i]=$(echo "$syno_diskspace" | grep "= "/${storageName[$i]}"" | cut -d "=" -f1 | rev | cut -d "." -f1 | rev)
and you should now get the correct volume usage (in percent) and the correct return state (depending on your -w and -c parameters).