MySQL Heart Beat Monitoring by Nagios

$Id$

http://webframe.sourceforge.jp/wiki/index.php?Nagios#cf04ac69

* Configurations (via NRPE)

1. Create database for monitoring replication

 - dba.sql
 - shema.sql

2. Install Cron Job on Master server

 $ less /etc/cron.d/mysql_mon
 *  *    * * *   mysql    /home/mysql/bin/write_heartbeat.pl

3. Install Nagios check script (check_mysql_heartbeat.pl) on Slave server
   and define monitoring command in "nrpe_local.cfg".
   
 command[check_mysql_heartbeat]=/usr/lib/nagios/plugins/check_mysql_heartbeat.pl -H localhost -w 60 -c 90 

4. Define check command on Nagios server

 define command { 
     command_name    check_remote_mysql_heartbeat
     command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mysql_heartbeat
 }

5. Define check service.