PDF (A4) - 40.9Mb
Man Pages (TGZ) - 259.7Kb
Man Pages (Zip) - 366.9Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb
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_Nameas a key. SeeSection 29.12.11, “Performance Schema Replication Tables”.Using
SHOW REPLICA STATUS FOR CHANNEL. By default, if thechannelFOR CHANNELclause is not used, this statement shows the replica status for all channels with one row per channel. The identifierchannelChannel_nameis added as a column in the result set. If aFOR CHANNELclause is provided, the results show the status of only the named replication channel.channel
TheSHOW 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 aSHOW VARIABLES statement in a topology with multiple channels shows the status of only the default channel.
The error codes and messages that are issued when multi-source replication is enabled specify the channel that generated the error.
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:
mysql> SELECT * FROM replication_connection_status\G;*************************** 1. row ***************************CHANNEL_NAME: source_1GROUP_NAME:SOURCE_UUID: 046e41f8-a223-11e4-a975-0811960cc264THREAD_ID: 24SERVICE_STATE: ONCOUNT_RECEIVED_HEARTBEATS: 0LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00RECEIVED_TRANSACTION_SET: 046e41f8-a223-11e4-a975-0811960cc264:4-37LAST_ERROR_NUMBER: 0LAST_ERROR_MESSAGE:LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00*************************** 2. row ***************************CHANNEL_NAME: source_2GROUP_NAME:SOURCE_UUID: 7475e474-a223-11e4-a978-0811960cc264THREAD_ID: 26SERVICE_STATE: ONCOUNT_RECEIVED_HEARTBEATS: 0LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00RECEIVED_TRANSACTION_SET: 7475e474-a223-11e4-a978-0811960cc264:4-6LAST_ERROR_NUMBER: 0LAST_ERROR_MESSAGE:LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:002 rows in set (0.00 sec) In the above output there are two channels enabled, and as shown by theCHANNEL_NAME field they are calledsource_1 andsource_2.
The addition of theCHANNEL_NAME field enables you to query the Performance Schema tables for a specific channel. To monitor the connection status of a named channel, use aWHERE CHANNEL_NAME= clause:channel
mysql> SELECT * FROM replication_connection_status WHERE CHANNEL_NAME='source_1'\G*************************** 1. row ***************************CHANNEL_NAME: source_1GROUP_NAME:SOURCE_UUID: 046e41f8-a223-11e4-a975-0811960cc264THREAD_ID: 24SERVICE_STATE: ONCOUNT_RECEIVED_HEARTBEATS: 0LAST_HEARTBEAT_TIMESTAMP: 0000-00-00 00:00:00RECEIVED_TRANSACTION_SET: 046e41f8-a223-11e4-a975-0811960cc264:4-37LAST_ERROR_NUMBER: 0LAST_ERROR_MESSAGE:LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:001 row in set (0.00 sec) Similarly, theWHERE CHANNEL_NAME= clause can be used to monitor the other replication Performance Schema tables for a specific channel. For more information, seeSection 29.12.11, “Performance Schema Replication Tables”.channel
PDF (A4) - 40.9Mb
Man Pages (TGZ) - 259.7Kb
Man Pages (Zip) - 366.9Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb