Book Image

MariaDB High Performance

By : Pierre Mavro
Book Image

MariaDB High Performance

By: Pierre Mavro

Overview of this book

Table of Contents (18 chapters)
MariaDB High Performance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Single instance


On a single instance (that's also available for replication and Galera), you can check several things.

First of all, you can check that your MariaDB instance is responding correctly:

> /usr/lib/nagios/plugins/check_mysql
Uptime: 141  Threads: 19  Questions: 298  Slow queries: 0  Opens: 55  Flush tables: 2  Open tables: 39  Queries per second avg: 2.113

This check creates a basic connection to your MariaDB instance and gives additional information.

If you really want to have a smaller check, you can simply make a connection and then disconnect.

Tip

Do not simply do create a TCP connection.

Avoid creating a TCP connection (with the check_tcp plugin) because creating a TCP connection will keep the SQL connection open. The problem is that you can reach the maximum SQL connection limit simply because of monitoring. You can avoid this problem using mysql_check because it properly disconnects the SQL session before closing the TCP connection.

Another check exists that permits us to...