Monitoring plugin check_mysql_slavestatus now supports mysql option file, socket (and more updates)

Written by - 0 comments

Published on - Listed in MySQL MariaDB Database Monitoring


The monitoring plugin check_mysql_slavestatus, a plugin to monitor MySQL slave replications (and catching potential non obvious errors), is somewhat special to me. It is the first and oldest monitoring I publicly released and is more than 11 years old already. Time flies.

Although I haven't worked on the plugin for years doesn't mean the plugin is dead. The new version includes changes from public PR's (which I haven't answered in years, shame on me!) and additional updates and improvements. Here's an overview:

  • Marc Falzon added the possibility to use a mysql (client) option file. This highly improves security as the password is not used on the mysql command anymore. Make sure the option file itself has secure permissions, too!
  • Andreas Pfeiffer added the possibility to use a local mysql socket to connect to.
  • The mysql command doesn't use the insecure --password option anymore, instead it uses the MYSQL_PWD environment variable if the password was defined using the -p parameter. Although using this method is not deemed secure, it is still better this way as the '--password=secret' password string will disappear from the process list. For highest security, the option file should be used.
  • The connection port parameter -P was required until today. The new version sets a default of port 3306 (the default tcp port MySQL listens to), therefore the -P parameter is optional now. Use this parameter if the target MySQL host listens on another port.
  • Properly introduce the (already since 2015) existing parameter -m in help and documentation. This parameter runs a "subcheck" of the replication and compares the slave's log position. If the log position has not changed within a certain threshold (in seconds), the plugin will alert with a WARNING. Such situations are rare but may arise (I've seen them) and falsely indicate a running replication while in reality the replication didn't move for a long time.
  • Additional minor changes and verification checks.

Documentation was updated accordingly.

Note: Obviously "MySQL" in this context means "MySQL and it's derivatives", as MariaDB, Percona, etc.



Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.