Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Checks the number of connections to a mysql server.
Current Version
Last Release Date
May 28, 2009
Owner
Nagios Exchange
Website
http://www.riege.com/
Shell script. - requires mysqladmin. - requires bash. - requires utils.sh from nagios plugins package
May I suggest a little patch to support PNP4Nagios? I am quite new at this an I do not know how to do in a different way, so as the patch is very small, I am pasting it here. Hope it can help. roberto ===== --- old/check_mysql_connections 2011-06-13 09:41:19.000000000 +0200 +++ new/check_mysql_connections 2011-06-13 09:46:49.000000000 +0200 @@ -14,6 +14,7 @@ # V1.1.0 gs 20060818 user mysqladmin options # V1.1.1 gs 20070405 fix result calculation # fix by and thanks to Stephan Helas +# 20110613 added PNP4nagios support - Roberto Resecco source /usr/lib/nagios/plugins/utils.sh @@ -84,15 +85,15 @@ CONNS=$((`mysqladmin $MYSQLOPTS processlist 2>/dev/null|wc -l`-4)) if [ $CONNS -ge $CRIT ]; then - echo "CRITICAL: $CONNS/$MAXCONNS mysql connections" + echo "CRITICAL: $CONNS/$MAXCONNS mysql connections|mysqlConnections=$CONNS" exit $STATE_CRITICAL elif [ $CONNS -ge $WARN ]; then - echo "WARNING: $CONNS/$MAXCONNS mysql connections" + echo "WARNING: $CONNS/$MAXCONNS mysql connections|mysqlConnections=$CONNS" exit $STATE_WARNING elif [ $CONNS -ge 0 ]; then - echo "OK: $CONNS/$MAXCONNS mysql connections" + echo "OK: $CONNS/$MAXCONNS mysql connections|mysqlConnections=$CONNS" exit $STATE_OK else - echo "UNKNOWN: Cannot determine number of connections" + echo "UNKNOWN: Cannot determine number of connections|mysqlConnections=$CONNS" exit $STATE_UNKNOWN fi =======
Been running this plug-in for a year or two now, but didn't notice until today that it wasn't actually sourcing the utils.sh file. I had to add the full path to line 18 "source /usr/local/nagios/libexec/utils.sh". With out this the status is already returned as "OK" but with the Warning, Critical, or OK text. Now that I have that in place it works like a charm. Probably something I missed when I first started this plugin.
You must be logged in to submit a review.
To:
From: