# Wrong Replication Lag in "MongoDB Replset Summary"

**URL:** <https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839>\
**Category:** MongoDB\
**Tags:** pmm, mongodb\
**Created:** [August 19, 2021, 3:31am UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839 "2021-08-19T03:31:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![webstock\_zt](https://avatars.discourse-cdn.com/v4/letter/w/8797f3/32.png) [@webstock\_zt](https://forums.percona.com/u/webstock_zt)\
**Post date:** [August 19, 2021, 3:31am UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839/1 "2021-08-19T03:31:05Z")

</div>

I deployed a mongodb sharded cluster with two shards.Each shard included a R-S-A mongodb replication.I monitored the cluster with the PMM.The version of both server and client is 2.18.The dashboard shows the wrong replication lag:51.63year.

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [August 19, 2021, 7:16am UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839/2 "2021-08-19T07:16:44Z")

</div>

Hi @webstock_zt,

Could you check _mongodb\_mongod\_replset\_member\_replication\_lag_ metric in Explore?

 ![Screenshot 2021-08-19 at 10.12.18](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/8/8d904a122bd347012b0ccf6b6c187f91080ddc50.png)

---

<div class="post-metadata">

**Author:** ![webstock\_zt](https://avatars.discourse-cdn.com/v4/letter/w/8797f3/32.png) [@webstock\_zt](https://forums.percona.com/u/webstock_zt)\
**Post date:** [August 25, 2021, 6:52am UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839/3 "2021-08-25T06:52:56Z")

</div>

> [@Vadim\_Yalovets](#):
>
> mongodb\_mongod\_replset\_member\_replication\_lag

Thank you for your reply! I checked the metric in Explore.It’s shown like this:

 ![微信图片_20210825145208](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/5/5f487d00f0a64c7d17e1ecc9ba45d4a1007d63b4.png)

---

<div class="post-metadata">

**Author:** ![webstock\_zt](https://avatars.discourse-cdn.com/v4/letter/w/8797f3/32.png) [@webstock\_zt](https://forums.percona.com/u/webstock_zt)\
**Post date:** [August 25, 2021, 7:06am UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839/6 "2021-08-25T07:06:47Z")

</div>

I should see 10 services, but I only see 8 services except two arbiters:

 ![services](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/6/602f39c689db010c1edc6fa302e5ec5c765a8a2f.png)

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [August 26, 2021, 1:06pm UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839/7 "2021-08-26T13:06:25Z")

</div>

> [@webstock\_zt](#):
>
> Thank you for your reply! I checked the metric in Explore.It’s shown like this:

It’s a bug. I have created [a ticket.](https://jira.percona.com/browse/PMM-8690)

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [August 26, 2021, 1:12pm UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839/8 "2021-08-26T13:12:09Z")

</div>

Arbiter instances are shown in dashboards.  
e.g.

 ![Screenshot 2021-08-26 at 13.42.53](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/c/cc9ce8d326fe0dc0e89ee0cbe32d83703c04373b.png)

 ![Screenshot 2021-08-26 at 16.11.41](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/4/4d8aa740ac7e158b9dc9d492dfb1684782dd7a15.jpeg)

Could you check pmm-agent logs?

---

<div class="post-metadata">

**Author:** ![webstock\_zt](https://avatars.discourse-cdn.com/v4/letter/w/8797f3/32.png) [@webstock\_zt](https://forums.percona.com/u/webstock_zt)\
**Post date:** [September 2, 2021, 12:33am UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839/9 "2021-09-02T00:33:42Z")

</div>

Thanks! The arbiters in my sharded cluster are still not shown in dashboards.How can I view the log conveniently?

---

<div class="post-metadata">

**Author:** ![liuyanan](https://avatars.discourse-cdn.com/v4/letter/l/c0e974/32.png) [@liuyanan](https://forums.percona.com/u/liuyanan)\
**Post date:** [September 27, 2021, 8:58am UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839/10 "2021-09-27T08:58:13Z")

</div>

hi,I’m sorry to bother you  
I have a mongodb replica set with one master node and two slave nodes. I want to install mongodb exoprter to collect mongodb indicators and configure it to send data to existing Prometheus. Do I only need to install mongodb exoprter on the master node of mongodb? Or do I need to install mongodb exoprter on every node?  
Currently I only have mongodb exopter installed on the master node, but I can’t get information on the two slave nodes，I can’t show three nodes like in your dashboard, I only show one master node in my dashboard,

---

<div class="post-metadata">

**Author:** ![webstock\_zt](https://avatars.discourse-cdn.com/v4/letter/w/8797f3/32.png) [@webstock\_zt](https://forums.percona.com/u/webstock_zt)\
**Post date:** [October 8, 2021, 5:52am UTC](https://forums.percona.com/t/wrong-replication-lag-in-mongodb-replset-summary/11839/11 "2021-10-08T05:52:46Z")

</div>

Hi，I installed the PMM client on each data-bearing node.That is to say, each data-bearing node has a mongodb exporter.
