[MXS-1404] Create MySQL Group replication monitoring Created: 2017-09-12  Updated: 2017-12-01  Resolved: 2017-09-21

Status: Closed
Project: MariaDB MaxScale
Component/s: N/A
Affects Version/s: None
Fix Version/s: 2.2.0

Type: New Feature Priority: Major
Reporter: bart vrancken Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

requirements:

  • list of nodes
  • username / password

On each node do:

<> show variables like 'server_uuid';

Get the UUID of the host you are looking at, which matches the MEMBER_ID value

<> SELECT * FROM performance_schema.replication_group_members\G;

Example (1 row per node, unless self node is offline, then only 1 result for self stating OFFLINE)

CHANNEL_NAME: group_replication_applier
MEMBER_ID: 00ce5e96-96ea-11e7-9fcd-0201ac10006f
MEMBER_HOST: 172.16.0.111
MEMBER_PORT: 13306
MEMBER_STATE: ONLINE

When the MEMBER_STATE == ONLINE, the node is healthy
Offline takes precedance on any node output. Suggestion would be

default -> UNKNOWN
any query saying ONLINE -> from UNKNOWN to HEALTHY (or keep HEALTHY)
any query saying OFFLINE -> set and keep OFFLINE

(so if node 1 says 3x online, but node 2 says there is 1 offline, then that node is offline)

<> SELECT @@global.read_only\G;

Output:

  • 0 -> Master
  • 1 -> Slave

Only 1 should be master. You can confirm this by running on all nodes

SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME= 'group_replication_primary_member';

then check if the UUID returned by all the nodes is the same. Then match the UUID to the MEMBER_ID from the first query
and promote that server to master. So both read_only flags and this query should match before promoting to master.



 Comments   
Comment by markus makela [ 2017-09-21 ]

Created an experimental Group Replication monitor which will be included in the experimental module package of 2.2.0.

Generated at Thu Feb 08 04:06:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.