How to check replication info percona mysql in pmm


[Detailed description of the issue or question]

I wonder if there is a metric in mysql replication information that tells me master and slave

Steps to Reproduce:

[Step-by-step instructions on how to reproduce the issue, including any specific settings or configurations]


[Insert the version number of the software]


[If applicable, include any relevant log files or error messages]

Expected Result:

[What the user expected to see or happen before the issue occurred]

Actual Result:

[What actually happened when the user encountered the issue]

Additional Information:

[Include any additional information that could be helpful to diagnose the issue, such as browser or device information]

Are you sure that mysql_repl_node_1 is configured as a replica server?
Can you check output of “show slave status”?
If it is replica then the IO THREAD ad SQL THREAD should show as yes.
Most probably the host is not configured as replica. If it is replica then IO Thread and SQL thread should show as yes or no

thank you for you reply

mysql_repl_node_1`s IO THREAD and SQL THREAD is No
But mysql_repl_node_2 is YES

i want to know summary metric name, who is master and who is slave

cluster have this,
mysql_perf_schema_replication_group_member_info {cluster=~“(mysql_cluster)”}’

this metric query show who is primary and who is secondary
like this image

If i put replication_set instead of cluster, this metric does not work

mysql_repl_node_1`s IO THREAD and SQL THREAD is No
Its not “NO”. It is “NO DATA” which means there is no replica config that means it is a master.

If it is just “NO” that means that the replication SQL/IO thread is not running and may be stopped with error or stopped by someone.

so i should check using SQL/IO thread Running.
SQL/IO third running is master if it is No data, and yes it is slave

So there is no metric which node is master and slave?

Yes the data should clear whether it is master or replica

Are you looking to do something with that data? Like you want to setup alerting then you can use alert template for it. Otherwise for identifying master and replica you can look at Thread status.