Rechercher dans le manuel MySQL
17.1.4.3 Multi-Source Replication Monitoring
To monitor the status of replication channels the following options exist:
Using the replication Performance Schema tables. The first column of these tables is
Channel_Name
. This enables you to write complex queries based onChannel_Name
as a key. See Section 26.12.11, “Performance Schema Replication Tables”.Using
SHOW SLAVE STATUS FOR CHANNEL
. By default, if thechannel
FOR CHANNEL
clause is not used, this statement shows the slave status for all channels with one row per channel. The identifierchannel
Channel_name
is added as a column in the result set. If aFOR CHANNEL
clause is provided, the results show the status of only the named replication channel.channel
The SHOW VARIABLES
statement does
not work with multiple replication channels. The information
that was available through these variables has been migrated to
the replication performance tables. Using a
SHOW VARIABLES
statement in a
topology with multiple channels shows the status of only the
default channel.
17.1.4.3.1 Monitoring Channels Using Performance Schema Tables
This section explains how to use the replication Performance Schema tables to monitor channels. You can choose to monitor all channels, or a subset of the existing channels.
To monitor the connection status of all channels:
- *************************** 1. row ***************************
- CHANNEL_NAME: master1
- GROUP_NAME:
- SOURCE_UUID: 046e41f8-a223-11e4-a975-0811960cc264
- THREAD_ID: 24
- SERVICE_STATE: ON
- COUNT_RECEIVED_HEARTBEATS: 0
- LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
- RECEIVED_TRANSACTION_SET: 046e41f8-a223-11e4-a975-0811960cc264:4-37
- LAST_ERROR_NUMBER: 0
- LAST_ERROR_MESSAGE:
- LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
- *************************** 2. row ***************************
- CHANNEL_NAME: master2
- GROUP_NAME:
- SOURCE_UUID: 7475e474-a223-11e4-a978-0811960cc264
- THREAD_ID: 26
- SERVICE_STATE: ON
- COUNT_RECEIVED_HEARTBEATS: 0
- LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
- RECEIVED_TRANSACTION_SET: 7475e474-a223-11e4-a978-0811960cc264:4-6
- LAST_ERROR_NUMBER: 0
- LAST_ERROR_MESSAGE:
- LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
In the above output there are two channels enabled, and as shown
by the CHANNEL_NAME
field they are called
master1
and master2
.
The addition of the CHANNEL_NAME
field
enables you to query the Performance Schema tables for a
specific channel. To monitor the connection status of a named
channel, use a WHERE
CHANNEL_NAME=
clause:
channel
- *************************** 1. row ***************************
- CHANNEL_NAME: master1
- GROUP_NAME:
- SOURCE_UUID: 046e41f8-a223-11e4-a975-0811960cc264
- THREAD_ID: 24
- SERVICE_STATE: ON
- COUNT_RECEIVED_HEARTBEATS: 0
- LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00
- RECEIVED_TRANSACTION_SET: 046e41f8-a223-11e4-a975-0811960cc264:4-37
- LAST_ERROR_NUMBER: 0
- LAST_ERROR_MESSAGE:
- LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
Similarly, the WHERE
CHANNEL_NAME=
clause
can be used to monitor the other replication Performance Schema
tables for a specific channel. For more information, see
Section 26.12.11, “Performance Schema Replication Tables”.
channel
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-replication-multi-source-monitoring.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.