4

I have been using mysql master:master replication and was always able to check the status of replication using this command:
mysql > show slave status\G I was able to see this in the show slave status command:
Slave_IO_Running: Yes Slave_SQL_Running: Yes Seconds_Behind_Master: 0 The seconds_behind_master always let me know if I was behind on one of my servers.

I am not using galera and am not sure how to verify if everything is up to date. I have come across this article "Monitoring Cluster Status"
I realize I can use this command to see how many nodes are in the cluster:
SHOW GLOBAL STATUS LIKE 'wsrep_cluster_size';

But I am not sure if this command if good enough to tell whether or not they are exactly up to date:
SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment'; This command currently show synced but I cannot tell if this is the best way to tell if I am good to go.

1 Answer 1

5

If wsrep_local_state_comment, wsrep_ready, and wsrep_connected show the correct values, then that particular node is good.

There's no Seconds_Behind_Master equivalent, because Galera is synchronous -- a healthy node can't be lagging, by definition and by design... a slow node slows down all the others, it doesn't lag behind them.

6
  • 1
    For the wsrep_local_state_comment What would be a correct value? I am currently seeing it set to synced.
    – Som3guy
    Mar 20, 2016 at 4:48
  • add wsrep_cluster_size which should be equal to the number of nodes of the cluster Mar 20, 2016 at 7:13
  • @Som3guy yes, 'Synced' is correct. Mar 20, 2016 at 12:17
  • @jerichorivera it should equal the number of nodes, but if it isn't, that does not necessarily mean this node has a problem. With 3 nodes, if "node x" suddenly returns a value of "2" here, then "node x" would actually be one of the good nodes... So, while useful information, it doesn't really give you any new information about this node. Mar 20, 2016 at 12:23
  • @Michael-sqlbot you are right Mar 20, 2016 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.