I'm having a rather weird issue, I'm running a script (Bash) on multiple servers and it stopped working on one of the servers (works perfectly fine on all other servers).
Here is the problem part of the script: (I did not write it myself, all credits go to "Rich") (http://www.notrainers.org/monitoring-memory-usage-on-linux-with-nagios-and-nrpe/)
if [ "$result" -lt "$warn_level" ]; then #Line 56 echo "Memory OK. $result% used." exit 0; elif [ "$result" -ge "$warn_level" ] && [ "$result" -le "$critical_level" ]; then #Line 59 echo "Memory WARNING. $result% used." exit 1; elif [ "$result" -gt "$critical_level" ]; then #Line 62 echo "Memory CRITICAL. $result% used." exit 2; fi
Complete error message:
./check_memory.sh: Line 56: [: 7.: integer expression expected ./check_memory.sh: Line 59: [: 7.: integer expression expected ./check_memory.sh: Line 62: [: 7.: integer expression expected
If you need more info, let me know and I will try to supply it as fast as possible.
Appreciate all inputs :)