# How to check replication info percona mysql in pmm

**URL:** <https://forums.percona.com/t/how-to-check-replication-info-percona-mysql-in-pmm/25952>\
**Category:** Percona Monitoring and Management (PMM)\
**Created:** [October 17, 2023, 2:34am UTC](https://forums.percona.com/t/how-to-check-replication-info-percona-mysql-in-pmm/25952 "2023-10-17T02:34:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmmChobo](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pmmChobo](https://forums.percona.com/u/pmmChobo)\
**Post date:** [October 17, 2023, 2:34am UTC](https://forums.percona.com/t/how-to-check-replication-info-percona-mysql-in-pmm/25952/1 "2023-10-17T02:34:21Z")

</div>

## Description:

[Detailed description of the issue or question]

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

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/9/938da825dc8259afcd1893ad4cd8bc735773d041.png)

## Steps to Reproduce:

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

## Version:

[Insert the version number of the software]

## Logs:

[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]

---

<div class="post-metadata">

**Author:** ![Yunus](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus/32/6430_2.png) [@Yunus](https://forums.percona.com/u/Yunus)\
**Post date:** [October 17, 2023, 3:14pm UTC](https://forums.percona.com/t/how-to-check-replication-info-percona-mysql-in-pmm/25952/2 "2023-10-17T15:14:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pmmChobo](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pmmChobo](https://forums.percona.com/u/pmmChobo)\
**Post date:** [October 18, 2023, 12:41am UTC](https://forums.percona.com/t/how-to-check-replication-info-percona-mysql-in-pmm/25952/3 "2023-10-18T00:41:22Z")

</div>

thank you for you reply

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/6/6404ae0593859da602d866bd5989553f1318794f.png)

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

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/d/d00c19798e105756fd3ae6c248273f56ad7237da.png)

If i put replication\_set instead of cluster, this metric does not work

---

<div class="post-metadata">

**Author:** ![yunus\_shaikh](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus_shaikh/32/3512_2.png) [@yunus\_shaikh](https://forums.percona.com/u/yunus_shaikh)\
**Post date:** [October 18, 2023, 6:46am UTC](https://forums.percona.com/t/how-to-check-replication-info-percona-mysql-in-pmm/25952/4 "2023-10-18T06:46:28Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![pmmChobo](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pmmChobo](https://forums.percona.com/u/pmmChobo)\
**Post date:** [October 18, 2023, 11:29pm UTC](https://forums.percona.com/t/how-to-check-replication-info-percona-mysql-in-pmm/25952/5 "2023-10-18T23:29:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pmmChobo](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@pmmChobo](https://forums.percona.com/u/pmmChobo)\
**Post date:** [October 18, 2023, 11:34pm UTC](https://forums.percona.com/t/how-to-check-replication-info-percona-mysql-in-pmm/25952/6 "2023-10-18T23:34:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yunus\_shaikh](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/yunus_shaikh/32/3512_2.png) [@yunus\_shaikh](https://forums.percona.com/u/yunus_shaikh)\
**Post date:** [October 24, 2023, 4:38pm UTC](https://forums.percona.com/t/how-to-check-replication-info-percona-mysql-in-pmm/25952/7 "2023-10-24T16:38:46Z")

</div>

> [@pmmChobo](#):
>
> so i should check using SQL/IO thread Running.

Yes the data should clear whether it is master or replica

> [@pmmChobo](#):
>
> So there is no metric which node is master and slave?

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.
