pmp-check-mysql-processlist

pmp-check-mysql-processlist - Alert when MySQL processlist has dangerous patterns.

SYNOPSIS

Usage: pmp-check-mysql-processlist [OPTIONS]
Options:
  -C CHECK        What to alert on; default states_count.
                  Other options: max_user_conn.
  -c CRIT         Critical threshold; default varies.
  --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.
  -w WARN         Warning threshold; default varies.
  --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 MySQL processlist in several ways, depending on the value of the -C option:

states_count

Alerts when there are too many processes in various states. The list of checks is as follows:

Unauthenticated users appear when DNS resolution is slow, and can be a warning sign of DNS performance problems that could cause a sudden denial of service to the server.

Locked processes are the signature of MyISAM tables, but can also appear for other reasons.

Too many processes copying to various kinds of temporary tables at one time is a typical symptom of a storm of poorly optimized queries.

Too many processes in the “statistics” state is a signature of InnoDB concurrency problems causing query execution plan generation to take too long.

The thresholds should be given as count. The default critical level is 32, and warning is 16.

max_user_conn

Alerts when @@max_user_connections is configured on MySQL and any user reaches this limit. The output of this check will display the user with maximum connections consumed, its count and percentage of the actual limit.

The thresholds should be given as percentage. The default critical level is 95, and warning is 90.

Examples:

# /usr/lib64/nagios/plugins/pmp-check-mysql-processlist
OK 0 unauthenticated, 0 locked, 0 copy to table, 0 statistics | processes=0;16;32;0;
# /usr/lib64/nagios/plugins/pmp-check-mysql-processlist -C max_user_conn
OK User with max connections: myappuser (70) = 2% | max_user_conn=2;90;95;0;100

PRIVILEGES

This plugin executes the following commands against MySQL:

  • SHOW PROCESSLIST;
  • SELECT @@max_user_connections;

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

VERSION

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

Next topic

pmp-check-mysql-replication-delay



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