April 16, 2014

Introducing the pmp-check-mysql-status Nagios Plugin

Most of the Nagios plugins included with the Percona Monitoring Plugins are purpose-built for specific scenarios that I found in my research to be frequent, severe, or subtle causes of problems in MySQL systems. They are intentionally not generic because I wanted to focus on doing one thing with each plugin, and doing it excellently. This makes the plugins easier to set up and use, and I believe it should help avoid some of the common problems such as spammy alerts.

There is one “generic, flexible” plugin, however, which you can use for fairly arbitrary checks of status counters and variables. This is the pmp-check-mysql-status plugin, which can perform computations on status variables. By default, I recommend using it only for two purposes:

  • Check whether the Uptime variable is too small, indicating the server has been restarted
  • Check whether Threads_connected is approaching max_connections, which can be inconvenient to solve in some environments

However, there’s no reason not to use the plugin for other purposes if you want. Here are some of the things you could do:

  • Compare a counter to a threshold
  • Compare a counter to a variable or another counter
  • Add, subtract, multiply, and divide counters or variables
  • Transform a ratio into a percentage
  • Compute the rate of change over time for one or more counters (e.g. queries per second)

The documentation contains examples of how to do all of these things, if you so desire.

About Baron Schwartz

Baron is the lead author of High Performance MySQL. He maintains a personal blog at Xaprb. Follow him at @xaprb or connect with him on LinkedIn.

Comments

  1. Subash says:

    Hi All,

    I am new to Percona plugins for monitoring MySQL in nagios.

    Can anyone please elobrate the process and help me to succeesfullly apply the plugins in my environemtn.

    Thanks,
    subash

  2. Hi Subash, you should ask that question on our Percona forums. Here’s the URL to the Percona Monitoring Plugins category: http://www.perconaforum.com/index.php?t=thread&frm_id=15&

Speak Your Mind

*