nagios mysql tables

Ben Clewett Ben at clewett.org.uk
Thu Jun 3 15:02:47 CEST 2004


Marcelo,

Something like:

#!/bin/sh
ROWS=`echo "SELECT COUNT(*) FROM table" | mysql -u user -ppass -D 
database -h host`
ROWS=`echo $ROWS | sed s/[^0-9]*//`
if [ $ROWS -gt 30 ] then
	echo "CRITICAL Rows ${ROWS} | rows=${ROWS}"
	exit 2
else
	echo "OK Rows ${ROWS} | rows=${ROWS}"
	exit 0
fi


Ben.

Marcos & Marcelo wrote:

> Hi Folks,
>  
>   I would like to know if there is a check plugin in nagios that checks 
> if a specified table of mysql has 30 rows or more?
>  
>  
> Tks,
> Marcelo
> 
> 
> ------------------------------------------------------------------------
> *Yahoo! Messenger* 
> <http://br.rd.yahoo.com//mail_br/tagline/?http://br.download.yahoo.com/messenger/> 
> - Fale com seus amigos online. Instale agora! 
> <http://br.rd.yahoo.com//mail_br/tagline/?http://br.download.yahoo.com/messenger/>



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list