pmp-check-mysql-replication-delay

pmp-check-mysql-replication-delay - Alert when MySQL replication becomes delayed.

SYNOPSIS

Usage: pmp-check-mysql-replication-delay [OPTIONS]
Options:
  -c CRIT         Critical threshold; default 600.
  --defaults-file FILE Only read mysql options from the given file.
                  Defaults to /etc/nagios/mysql.cnf if it exists.
  -H HOST         MySQL hostname.
  -l USER         MySQL username.
  -L LOGIN-PATH   Use login-path to access MySQL (with MySQL client 5.6).
  -m CRIT         Minimal threshold to ensure for delayed slaves; default 0.
  -p PASS         MySQL password.
  -P PORT         MySQL port.
  -S SOCKET       MySQL socket file.
  -s SERVERID     MySQL server ID of master, if using pt-heartbeat table.
  -T TABLE        Heartbeat table used by pt-heartbeat.
  -u              Use UTC time to count the delay in case pt-heartbeat is run
                  with --utc option.
  -w WARN         Warning threshold; default 300.
  --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 MySQL replication is delayed too much. By default it uses SHOW SLAVE STATUS, but the output of the Seconds_behind_master column from this command is unreliable, so it is better to use pt-heartbeat from Percona Toolkit instead. Use the -T option to specify which table pt-heartbeat updates. Use the -s option to specify the master’s server_id to compare against; otherwise the plugin reports the maximum delay from any server.

If you want to run this check against the delayed slaves, e.g. those running with pt-slave-delay tool, you may want to use -m option specifying the minimal delay that should be ongoing, otherwise the plugin will alert critical.

PRIVILEGES

This plugin executes the following commands against MySQL:

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

    or

  • SELECT from the pt-heartbeat table.

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

VERSION

Percona Monitoring Plugins pmp-check-mysql-replication-delay 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-processlist

Next topic

pmp-check-mysql-replication-running



© 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.
]]>