pmp-check-pt-table-checksum

pmp-check-pt-table-checksum - Alert when pt-table-checksum finds data differences on a replica.

SYNOPSIS

Usage: pmp-check-pt-table-checksum [OPTIONS]
Options:
  -c CRIT         Raise a critical error instead of a warning.
  --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).
  -p PASS         MySQL password.
  -P PORT         MySQL port.
  -S SOCKET       MySQL socket file.
  -i INTERVAL     Interval over which to ensure pt-table-checksum was run,
                  in days; default - not to check.
  -T TABLE        The checksum table; default percona.checksums
  -w WARN         Warning threshold; ignored.
  --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 has drifted out of sync with the master’s data, according to checks performed by the pt-table-checksum tool in Percona Toolkit. It uses the following query to determine whether the server’s data matches its master’s:

SELECT /\* MAGIC_checksum_diff_query \*/
CONCAT(
   COUNT(\*),
   ' chunks differ in ',
   COUNT(DISTINCT CONCAT(db, tbl)),
   ' tables, including ',
   MIN(CONCAT(db, '.', tbl)))
FROM CHECKSUM_TABLE
WHERE master_cnt <> this_cnt OR master_crc <> this_crc
   OR ISNULL(master_crc) <> ISNULL(this_crc)
HAVING COUNT(\*) > 0

The word CHECKSUM_TABLE is replaced by the value of the -T option. If the table specified by -T does not exist, unknown is raised.

Optionally, you can specify an interval in days over which to ensure pt-table-checksum was run. It is useful in cases when the cron job doing the checksumming suddenly stopped working. This option will have an effect when no diffs are found and the checksum table is not empty.

Alerts are raised at a WARNING level by default, but specifying the -c option with any value will change this to CRITICAL instead.

PRIVILEGES

This plugin executes the following commands against MySQL:

  • SELECT against the specified table.

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

VERSION

Percona Monitoring Plugins pmp-check-pt-table-checksum 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-ts-count

Next topic

pmp-check-unix-memory



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