+1-208-473-2904 (USA - Sales)
0-800-051-8984 (UK - Sales)
0-800-181-0665 (GER - Sales)
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. -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.
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.
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.1.4