Intro/Background
The check_mysql_slave plugin allows you to check that a particular MySQL replication slave is running and (coming soon) is within a threshold bytes or seconds behind its master.
This project includes:
check_mysql_slave - connects to a MySQL replication slave and checks its status
check_mysql_slave_epn - same script but modified to work with Nagios EPN
Documentation:
I use these plugins on my networks so I'm open to suggestions for improvements and to assist you with some difficulties if you use these plugins.
The plugin is documented with perl POD. Use the --help option to view it or see the manual, or read the HTML version at this URL:
check_mysql_slave
Features
- works with MySQL versions 3.23, 4.1, and 5.0
- helpful error messages are printed next to CRITICAL status like access denied, mysql client version incompatible with server, etc.
DOWNLOAD
Current version is 0.1, posted on 19 August 2008.
Tar/Gzip
check_mysql_slave.tar.gz
Zip
check_mysql_slave.zip
Compatibility
This plugin has been tested with MySQL versions 3.23, 4.1, and 5.0.
However, newer versions of MySQL server are not always compatible
with old MySQL clients and perl modules. If the plugin fails with
a message about upgrading, take the advice.
Here is a table of minimum versions known to work together (if you know of
lower version number combinations that work, please let me know):
| Server |
Client |
Perl |
Perl Modules |
| mysql-3.23 |
mysql-3.23 |
5.8.0 |
DBI-1.21, DBD-mysql-2.11 |
| mysql-4.1 |
mysql-4.1 |
5.8.1 |
DBI-1.67, DBD-mysql-4.008 |
| mysql-5.0 |
mysql-5.0 |
5.8.1 |
DBI-1.67, DBD-mysql-4.008 |
Usage Notes
None right now.
Troubleshooting
I see "UNKNOWN" and "no output!" in the Nagios web interface
The plugin fails with UNKNOWN status code when required
perl modules are missing, and it prints a list of missing
modules, but when I view this on my nagios website it says
"no output!". Try prepending /usr/bin/perl to the command_line
to make sure it does not run in Nagios embedded perl.
"ePN failed to compile /usr/lib/nagios/plugins/check_mysql_slave: Missing right curly or square bracket"
If you are using Nagios with embedded perl (ePN), you must use the epn versions of the plugin (included in the distribution). If you don't, you are likely to get an error saying "ePN failed to compile /usr/lib/nagios/plugins/check_email_delivery: Missing right curly or square bracket". The epn version of the plugin is called "check_mysql_slave_epn".
Future Improvements
Open to suggestions... please email me at jonathan@buhacoff.net
If you would like to be notified of bug fixes and improvements, just email me at jonathan@buhacoff.net and ask to be on the mailing list.
Important! Please include the word Nagios in your subject line.
License
check_mysql_slave - a Nagios plugin to check MySQL Replication services
Copyright (C) 2008-2009 Jonathan Buhacoff
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; either version 2 of the License, or
(at your option) any later version.
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 St, Fifth Floor, Boston, MA 02110-1301 USA
Search for other plugins at Nagios Exchange
http://www.nagiosexchange.org
See also...
http://nagios.org
http://nagiosplug.sourceforge.net
http://search.cpan.org/dist/Nagios-Plugin/lib/Nagios/Plugin.pm
Comments (0)
You don't have permission to comment on this page.