Build precise queries to find exactly what you need
Press ESC to close
alext’s fixes are appropriate. Here’s the patch:
— check_swap_activity 2013-12-19 10:03:53.760950053 -0500 +++ check_swap_activity-2 2013-12-20 11:26:27.860034216 -0500 @@ -96,12 +96,12 @@ LINE=”OK! Swapout size in last ${DURATION} second(s): ${SWAPOUT_ACTIVITY} | swapout_size=${SWAPOUT_ACTIVITY}B;${SWAP_WARN};${SWAP_CRIT};” echo $LINE exit 0 -elif [ ${SWAPOUT_ACTIVITY} -gt ${SWAP_WARN} ] && [ ${SWAPOUT_ACTIVITY} -lt ${SWAP_CRIT} ] || [ ${SWAPOUT_ACTIVITY} -eq ${SWAP_WARN} ]; then +elif [ ${SWAPOUT_ACTIVITY} -ge ${SWAP_WARN} ] && [ ${SWAPOUT_ACTIVITY} -lt ${SWAP_CRIT} ]; then ## SWAP IS IN WARNING STATE LINE=”WARNING! Swapout size in last ${DURATION} second(s): ${SWAPOUT_ACTIVITY} | swapout_size=${SWAPOUT_ACTIVITY}B;${SWAP_WARN};${SWAP_CRIT};” echo $LINE exit 1 -elif [ ${USED_SWAP} -gt ${SWAP_CRIT} ] || [ ${USED_SWAP} -eq ${SWAP_CRIT} ]; then +elif [ ${SWAPOUT_ACTIVITY} -ge ${SWAP_CRIT} ]; then ## SWAP IS IN CRITICAL STATE LINE=”CRITICAL! Swapout size in last ${DURATION} second(s): ${SWAPOUT_ACTIVITY} | swapout_size=${SWAPOUT_ACTIVITY}B;${SWAP_WARN};${SWAP_CRIT};” echo $LINE
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!