mysql_ - Munin plugin to display misc MySQL server status
Any MySQL platform, tested by the author on MySQL 5.1.29 and 5.0.51
This script is used to generate data for several graphs. To generate data for one specific graph, you need to create a symbolic link with a name like mysql_<GRAPH> to this script.
If you need to run against multiple MySQL instances on the same host, create your symlinks with names like mysql<N>_<GRAPH> where N is any non-negative integer. You must also set the env.cachenamespace variable to a unique value for each group of symlinks.
To get a list of symlinks that can be created, run:
In addition you might need to specify connection parameters in the plugin configuration to override the defaults. These are the defaults:
[mysql_*] env.mysqlconnection DBI:mysql:mysql env.mysqluser root
[mysql_*] env.mysqlconnection DBI:mysql:mysql;host=127.0.0.1;port=3306 env.mysqluser root env.mysqlpassword geheim env.cachenamespace munin_mysql_pri [mysql2_*] env.mysqlconnection DBI:mysql:mysql;host=127.0.0.1;port=13306 env.mysqluser root env.mysqlpassword ryuWyawEv env.cachenamespace munin_mysql_alt
Warning and critical values can be set via the environment in the usual way. For example:
[mysql_replication] env.slave_io_running_warning 0.5 env.slave_sql_running_warning 0.5 env.seconds_behind_master_warning 300 env.seconds_behind_master_critical 600
The plugin uses shared memory to cache the statistics gathered from MySQL. This ensures minimal inpact on the MySQL server.
The statistics from innodb are mainly collected from the command
SHOW ENGINE INNODB STATUS
A nice walk through is found at http://www.mysqlperformanceblog.com/2006/07/17/show-innodb-status-walk-through/
FIX point to relevant sections in the MySQL manual and other www resources for each graph
slave_io_running and slave_sql_running both translate the "Yes" values to 0 and anything else to 1 for their respective fields in the "SHOW SLAVE STATUS" output. This can be used to warn on slave failure if the warning and critical values are set as seen in a previous section.
Copyright (C) 2008,2009 Kjell-Magne Øierud
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
git-master + a few munin modifications
This plugin was downloaded from http://github.com/kjellm/munin-mysql/
#%# family=auto #%# capabilities=suggest autoconf