# Unable to add MongoDB Replicaset to PMM

**URL:** <https://forums.percona.com/t/unable-to-add-mongodb-replicaset-to-pmm/16896>\
**Category:** Percona Monitoring and Management (PMM)\
**Created:** [August 4, 2022, 4:25pm UTC](https://forums.percona.com/t/unable-to-add-mongodb-replicaset-to-pmm/16896 "2022-08-04T16:25:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirangelli](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kirangelli](https://forums.percona.com/u/kirangelli)\
**Post date:** [August 4, 2022, 4:25pm UTC](https://forums.percona.com/t/unable-to-add-mongodb-replicaset-to-pmm/16896/1 "2022-08-04T16:25:53Z")

</div>

Hi Team,

We are on Percona server for MongoDB 4.4 version.  
PMM Client version - pmm2  
PMM server is Installed using Docker Image.

When we are trying to configure PMM for our MongoDB replica sets.  
Even though, when we add **–replication-set** tag, It is not being detected in the MongoDB Replica Set summary dashboard.

I have used the below command to add the nodes to PMM.  
(Ran this command on all the 3 nodes present in the replica set).

pmm-admin add mongodb --username=pmm --password=password --environment=DEV --replication-set=replication\_name --authentication-mechanism=SCRAM-SHA-1

Can you please review and help me out.

Thank you  
Kiran

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [August 5, 2022, 11:28am UTC](https://forums.percona.com/t/unable-to-add-mongodb-replicaset-to-pmm/16896/2 "2022-08-05T11:28:39Z")

</div>

Hello, you don’t need to provide the --replication-set flag as PMM will automatically detect the members of a replica set based on rs.status() output. Try adding as follows:

`pmm-admin add mongodb --username=pmm --password=password --environment=DEV`

Also make sure you select the Last 5 min in the dashboard, and give it 1-2 min time to populate to check for the new member.

---

<div class="post-metadata">

**Author:** ![kirangelli](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kirangelli](https://forums.percona.com/u/kirangelli)\
**Post date:** [August 5, 2022, 7:09pm UTC](https://forums.percona.com/t/unable-to-add-mongodb-replicaset-to-pmm/16896/4 "2022-08-05T19:09:24Z")

</div>

Hello Ivan,

Thank you for your response.  
I tried adding the service without --replication-set flag but, unable to see the replicaset on the dashboard.

Below is the screenshot of pmm-admin list post service addition.

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

Do we need to enable any setting/change configuration for the replicaset to be displayed on the dashboard?  
Please help me out.

Thank you,  
Kiran

---

<div class="post-metadata">

**Author:** ![kirangelli](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kirangelli](https://forums.percona.com/u/kirangelli)\
**Post date:** [August 9, 2022, 2:21pm UTC](https://forums.percona.com/t/unable-to-add-mongodb-replicaset-to-pmm/16896/5 "2022-08-09T14:21:18Z")

</div>

Hi @Ivan_Groenewold

We were able to figure out the Issue here.  
pmm-server version we are on is 2.20.0  
pmm2-client version is 2.29.1

We tried upgrading the docker image of the pmm-server to 2.28.0 and It resolved the Issue. (Are there any version specifications[server and the client] that you recommend while configuring the PMM?

Thank you for your time and help on this.

Regards,  
Kiran

---

<div class="post-metadata">

**Author:** ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)\
**Post date:** [August 9, 2022, 2:26pm UTC](https://forums.percona.com/t/unable-to-add-mongodb-replicaset-to-pmm/16896/6 "2022-08-09T14:26:00Z")

</div>

Hello, glad to hear you sorted it out. As per [the manual](https://docs.percona.com/percona-monitoring-and-management/how-to/upgrade.html) always use a PMM server version higher or equal to the client. Ideally they should be the same version except during an upgrade.
