Book Image

Mastering MariaDB

By : Federico Razzoli
Book Image

Mastering MariaDB

By: Federico Razzoli

Overview of this book

Table of Contents (19 chapters)
Mastering MariaDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Monitoring and troubleshooting


Galera provides a set of status variables, which can be used to monitor the status of each node. Like Galera server variables, each status variable starts with the 'wsrep_' prefix. This allows visualizing all the variables easily with the following query:

SHOW STATUS LIKE 'wsrep%';

There are at least two ways to automate the monitoring of MariaDB Galera Cluster:

  • Using a plugin called Galera Cluster Nagios. It is developed and maintained by FromDual, and can be downloaded from their site: http://www.fromdual.com/. This plugin is not covered by this book. The FromDual's website provides the needed documentation.

  • Using Galera automatic notifications.

Notification scripts

The wsrep_notify_cmd server variable can be set to a shell command or script, which will be automatically called when the node changes its status. Some parameters will be added to the invocation to provide the notification script with all the information it may need. The script can then use this...