All, i have written a wrapper for a plugin that has issues running through nagios and sending out email alerts with a threshold is exceeded. The wrapper works fine commandline, will show as warning or critical on the nagios url, but no email alerts are sent. The definitions for the service check are set properly. But i cant figure this out. Here is the wrapper below. And before anyone asks, the original plugin needs to be run through a wrapper because of ePN issues.
#!/bin/sh
res=$(/usr/local/nagios/libexec/check_mysql -w=6 -c=800)
#result= $result | awk '{print $1}'
echo $res
STATE_OK=0
STATE_CRITICAL=2
STATE_WARNING=1
case “$res” in
OK) exit $STATE_OK ;;
WARNING) exit $STATE_WARNING ;;
CRITICAL) exit $STATE_CRITICAL ;;
*) exit 3 ;;
esac