+1-208-473-2904 (USA - Sales)
0-800-051-8984 (UK - Sales)
0-800-181-0665 (GER - Sales)
+1-925-271-5054 (Training)
pmp-check-pt-table-checksum - Alert when pt-table-checksum finds data differences on a replica.
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.
-p PASS MySQL password.
-P PORT MySQL port.
-S SOCKET MySQL socket file.
-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.
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.
Alerts are raised at a WARNING level by default, but specifying the -c option with any value will change this to CRITICAL instead.
This check should be backwards compatible with Maatkit’s mk-table-checksum tool as well.
This plugin executes the following commands against MySQL:
This plugin executes no UNIX commands that may need special privileges.
Percona Monitoring Plugins pmp-check-pt-table-checksum 1.0.3