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

Replication


With check_mysql, there is a simple way to know the replication status with an additional argument:

> /usr/lib/nagios/plugins/check_mysql -S
Uptime: 143  Threads: 19  Questions: 302  Slow queries: 0  Opens: 55  Flush tables: 2  Open tables: 39  Queries per second avg: 2.111 Slave IO: Yes Slave SQL: Yes Seconds Behind Master: 0

This will inform you about slave I/O and SQL status (the most important information).

The other information is Seconds Behind Master, which denotes the delta between the master and the slave. This is an all-in-one check and may be enough for your needs.

However, you may want to set thresholds to Seconds Behind Master or disable it. Here it is not possible, but you can use the check_mysql_health check instead.

The following are some interesting options:

  • slave-lag: This is the value of Seconds Behind Master

  • slave-io-running: This gives information regarding the running slave I/O (copying binlog from master host)

  • slave-sql-running: This gives information...