Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
foncu
Good plugin, I added Perfdata for NagiosGraph replacing the final 3 IF by this code:
if [[ "$percent" -le $critical ]]; then
echo "CRITICAL - $free MB ($percent%) Free Memory | total=${total}MB used=${used}MB"
exit $STATE_CRITICAL
elif [[ "$percent" -le $warning ]]; then
echo "WARNING - $free MB ($percent%) Free Memory | total=${total}MB used=${used}MBÂș"
exit $STATE_WARNING
elif [[ "$percent" -gt $warning ]]; then
echo "OK - $free MB ($percent%) Free Memory | total=${total}MB used=${used}MB"
exit $STATE_OK
fi
if [[ "$percent" -le $critical ]]; then
echo "CRITICAL - $free MB ($percent%) Free Memory | total=${total}MB used=${used}MB"
exit $STATE_CRITICAL
elif [[ "$percent" -le $warning ]]; then
echo "WARNING - $free MB ($percent%) Free Memory | total=${total}MB used=${used}MBÂș"
exit $STATE_WARNING
elif [[ "$percent" -gt $warning ]]; then
echo "OK - $free MB ($percent%) Free Memory | total=${total}MB used=${used}MB"
exit $STATE_OK
fi