pmp-check-mysql-deleted-files

pmp-check-mysql-deleted-files - Alert when MySQL’s files are deleted.

SYNOPSIS

Usage: pmp-check-mysql-deleted-files [OPTIONS]
Options:
  -c CRIT         Critical threshold; ignored.
  --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.
  -w WARN         Warning threshold; changes the alert to WARN instead of CRIT.
  --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 looks at the files that the mysqld process has open, and warns if any of them are deleted that shouldn’t be. This typically happens when there is a poorly written logrotate script or when a human makes a mistake at the command line. This can cause several bad effects. If a table has been deleted, of course, it is a serious matter. Such a file can also potentially fill up the disk invisibly. If the file is the server’s log, it might mean that logging is effectively broken and any problems the server experiences could be undiagnosable.

The plugin accepts the -w and -c options for compatibility with standard Nagios plugin conventions, but they are not based on a threshold. Instead, the plugin raises a critical alert by default, and if the -w option is given, it raises a warning instead, regardless of the option’s value.

This plugin doesn’t alert about deleted temporary files, which are not a problem. By default, this plugin assumes that the server’s temporary directory is either the TMPDIR environment variable, or if that is not set, then /tmp/. If you specify MySQL authentication options, the value will log into the specified MySQL instance and look at the tmpdir variable to find the temporary directory.

This plugin looks at the first running instance of MySQL, as found in the system process table, so it will not work on systems that have multiple instances running. It probably works best on Linux, though it might work on other operating systems. It relies on either lsof or the ability to list the files in the process’s /proc/pid/fd directory.

PRIVILEGES

This plugin executes the following commands against MySQL:

  • SELECT the system variable @@tmpdir.

This plugin executes the following UNIX commands that may need special privileges:

  • ps
  • lsof
  • ls /proc/$pid/fd

VERSION

Percona Monitoring Plugins pmp-check-mysql-deleted-files 1.0.5

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-deadlocks

Next topic

pmp-check-mysql-file-privs



© Copyright 2012, Percona Inc.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
{@ footer_documentation_bugs @}
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.
{@ /footer_documentation_bugs @} ]]>