check_mysql_perf Nagios Plugin README
---------------------

* For instructions on installing this plugin for use with Nagios,
  see below. In addition, generic instructions for the GNU toolchain
  can be found in the INSTALL file.

* For information on detailed changes that have been made or plugins 
  that have been added, read the Changelog file.

* Some plugins require that you have additional programs and/or
  libraries installed on your system before they can be used.  Plugins
  that are dependent on other programs/libraries that are missing are
  usually not compiled. Read the REQUIREMENTS file for more information.

* For a list of outstanding bugs for this release, see the BUGS file.

* Individual plugins are self documenting.  All plugins that comply with
  the basic guidelines for development will provide detailed help when
  invoked with the '-h' or '--help' options.

* The file command.cfg contains example configurations for many of the
  plugins


You can check for the latest release at:
  http://www.consol.de/opensource/nagios/check-mysql-perf

Send mail to gerhard.lausser@consol.de for assistance.  Please
include the OS type and version that you are using.  Also, run the plugin with
the '-vvv' option and provide the resulting version information.  Of course, 
there may be additional diagnostic information required as well.  Use good
judgment.



Quick-and-Dirty Installation Instructions
--------------------------------------------------------

1) Run the configure script to initialize variables and create a Makefile, etc.

	./configure --prefix=BASEDIRECTORY --with-officialplugins=OPDIR

   a) Replace BASEDIRECTORY with the path of the directory under which Nagios
      is installed (default is '/usr/local/nagios')
   b) Replace OPDIR with the path of the directory under which you
      unpacked and compiled the official nagios plugins. 
      (they can be found at http://www.nagiosplugins.org)
      You need this parameter!!

2) Compile the plugins with the following command:

	make


3) Install the compiled plugins and plugin scripts with the following command:

	make install

   The installation procedure will attempt to place the plugins in a 
   'libexec/' subdirectory in the base directory you specified with
   the --prefix argument to the configure script.


That's it! If you have any problems or questions, feel free send mail
to gerhard.lausser@consol.de


Usage
-----

check_mysql_perf can be used to monitor several aspects of a mysql database

1) slave-lag
    Measures the seconds a slave is behind his master in a replication setup.
    This value might not be accurate unless you have a fast network.

2) slave-io-running 
    Checks whether the I/O thread is started and has connected successfully
    to the master.

3) slave-sql-running
    Checks whether the SQL thread is started. 

4) threads-connected
    Measures the numer of currently open connections.

5) qcache-hitrate
    Measures the hitrate of the query cache.

6) keycache-hitrate
    Measures the hitrate of the key cache.

7) connection-time
    Measures the time it takes to login to the database.

You tell check_mysql_perf what you want to check by using the -m 
command line parameter. With the exception of 2 and 3 which either say
ok or not ok, you can provide your own thresholds using -w and -c.
The values of these parameters are ranges (see nagios plugins developer guide)

Example: Alert if Query cache hitrate drops below 98% and 90%
check_mysql_perf -m qcache-hitrate -w 98: -c 90:

Example: Alert if connection to the database takes too long.
check_mysql_perf -m connection-time -w 3 -c 10



LICENSE STUFF
-------------

This software is released under the GNU Public License with the additional
exemption that compiling, linking and/or using OpenSSL is allowed.

See the COPYING file for the complete GPL text. 


--
