EmergencyEMERGENCY? Get 24/7 Help Now!

Introducing the pmp-check-mysql-status Nagios Plugin

 | March 29, 2012 |  Posted In: Insight for DBAs, MySQL, Percona Software

PREVIOUS POST
NEXT POST

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.

PREVIOUS POST
NEXT POST
Baron Schwartz

Baron is the lead author of High Performance MySQL. He is a former Percona employee.

2 Comments

Leave a Reply

 
 

Percona’s widely read Percona Data Performance blog highlights our expertise in enterprise-class software, support, consulting and managed services solutions for both MySQL® and MongoDB® across traditional and cloud-based platforms. The decades of experience represented by our consultants is found daily in numerous and relevant blog posts.

Besides specific database help, the blog also provides notices on upcoming events and webinars.
Want to get weekly updates listing the latest blog posts? Subscribe to our blog now! Submit your email address below and we’ll send you an update every Friday at 1pm ET.

No, thank you. Please do not ask me again.