Random Project

Nice plugin

I like the fact that you report how much is used instead of how much is free.
A couple of suggestions;
Instead of getting details for all devices (df -P | grep -w $device) try just checking the needed device (df -P $device |tail -1)

I like to also see the numbers the percentage is based on in nagios – you could consider checking like this;
read size used free usedPercent rinting the results:
echo “$msg – $device space used=$usedPercent% ($used of $size used) | ‘$device usage’=$usedPercent%;$warning;$critical;”

Just my thoughs 🙂
Best regards
Theis M. Mønsted