pmp-check-mysql-replication-running

pmp-check-mysql-replication-running - Alert when MySQL replication stops.

SYNOPSIS

Usage: pmp-check-mysql-replication-running [OPTIONS]
Options:
  -c CRIT         Report CRITICAL when replication is stopped with or w/o errors.
  --defaults-file FILE Only read mysql options from the given file.
                  Defaults to /etc/nagios/mysql.cnf if it exists.
  -d              Useful for slaves delayed by pt-slave-delay. It will not alert
                  when IO thread is running, SQL one is not and no errors.
  -H HOST         MySQL hostname.
  -l USER         MySQL username.
  -L LOGIN-PATH   Use login-path to access MySQL (with MySQL client 5.6).
  -p PASS         MySQL password.
  -P PORT         MySQL port.
  -S SOCKET       MySQL socket file.
  -w WARN         Report WARNING when SHOW SLAVE STATUS output is empty.
  --help          Print help and exit.
  --version       Print version and exit.
Options must be given as --option value, not --option=value or -Ovalue.
Use perldoc to read embedded documentation with more details.

DESCRIPTION

This Nagios plugin examines whether replication is running. It is separate from the check for delay because it is confusing or impossible to handle all of the combinations of replication errors and delays correctly, and provide an appropriate type of alert, in a single program.

By default, this plugin treats it as critical when the either thread stops with an error, and a warning when threads are stopped with no error. You can provide critical and warning thresholds with the -c and -w options, for compatibility with Nagios plugin conventions, but they don’t work as thresholds. Instead, if you specify a critical threshold, this plugin will treat it as critical if either thread is stopped, with or without an error.

The warning threshold makes the plugin report a warning when SHOW SLAVE STATUS produces no output, which means it is not configured as a replica. By default, this plugin will report that replication is healthy when a server isn’t configured as a replica.

If you want to run this check against the delayed slaves, e.g. those running with pt-slave-delay tool, you may want to specify -d option. It will not alert when Slave_IO_Running is Yes, Slave_SQL_Running is No and there are no errors.

PRIVILEGES

This plugin executes the following commands against MySQL:

  • SHOW SLAVE STATUS NOLOCK with Percona Server and w/o NOLOCK otherwise.

This plugin executes no UNIX commands that may need special privileges.

VERSION

Percona Monitoring Plugins pmp-check-mysql-replication-running 1.1.4

Percona Monitoring Plugins
Call Us
+1-888-316-9775 (USA - Sales)
+1-208-473-2904 (USA - Sales)
+44-208-133-0309 (UK - Sales)
0-800-051-8984 (UK - Sales)
0-800-181-0665 (GER - Sales)
+1-877-862-4316 (Emergency)
+1-855-55TRAIN (Training)
+1-925-271-5054 (Training)

Table Of Contents

Previous topic

pmp-check-mysql-replication-delay

Next topic

pmp-check-mysql-status



© Copyright 2012, Percona Inc.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
This documentation is developed in Launchpad as part of the Percona Monitoring Plugins source code.
If you spotted innacuracies, errors, don't understood it or you think something is missing or should be improved, please file a bug.
]]>