Build precise queries to find exactly what you need
Press ESC to close
@vex
Favorites0
Views
Projects0
Hi there! Thanks for the wonderful work. Monitoring active/standby unit worked out of the box, but trying to get active sessions yielded "Error - Not numeric value : = Max_Used_Sessions", no matter if I used version 1 or 2c. So I simply deleted the whole if block around $Max_Used_Sessions and deleted "|sed -n '2p'" as the output of snmpwalk was always a single line. Function looks now like this: sessions_max() { Max_Used_Sessions=`/usr/bin/snmpwalk $walk_param $mib_sessions_max | cut -d' ' -f4` check_num $Max_Used_Sessions Max_Used_Sessions if [ $Used_Sessions -gt $Max_Used_Sessions ] then echo "Error - Too many sessions used : $Used_Sessions, but only $Max_Used_Sessions max sessions allowed!" exit $result_Unknwon fi }
Reviewed 11 years ago