# Pmm2 setup on a sharded cluster - stats not displayed

**URL:** <https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628>\
**Category:** PMM 2.x\
**Created:** [May 29, 2021, 8:54pm UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628 "2021-05-29T20:54:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhaskar.avisha](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bhaskar.avisha](https://forums.percona.com/u/bhaskar.avisha)\
**Post date:** [May 29, 2021, 8:54pm UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628/1 "2021-05-29T20:54:19Z")

</div>

Hello All,

I am running into PMM dashboard issue for Sharded Cluster ,

i have a 3 node 4 sharded cluster, 3 config and 2 orbiter , a total of 17 nodes.  
steps i followed to added cluster to PMM

1. installed PMM client RPM on all the 17 nodes – pmm2-client-2.14.0-6.el7.x86\_64.rpm
2. added below to sudoers file

%dba ALL=(root) NOPASSWD: /usr/bin/pmm-admin

1. created explainPlan role and added mongodb\_exporter as user

2. used below commands to start agent and add all the servers to PMM

→ sudo pmm-admin config --server-insecure-tls --server-url=[https://admin:XXX@myPMMserver:1234](https://admin:XXX@myPMMserver:1234)

1. using below command to Router

→ sudo pmm-admin add mongodb --username mongodb\_exporter --service-name Router1-Service --password XXXX --host=MyRouterServer1 --port=50001 --cluster MyTESTCluster --skip-connection-check --tls --tls-certificate-key-file=/certlocation/mongo.pem --tls-ca-file=/certlocation/ca.crt --environment TEST

1. below command to add Replica Set to the Cluste

→ sudo pmm-admin add mongodb --username mongodb\_exporter --service-name MySha1Rep1 -Service --password XXXX --host=MySha1Rep1 --port=50002 --cluster MyTESTCluster --replication-set MySha1RepSet --skip-connection-check --tls --tls-certificate-key-file=/certlocation/mongo.pem --tls-ca-file=/certlocation/ca.crt --environment TEST

after all these steps ,i am not able to see stats on the dashboard, i have verified if the user has appropriate acces, the version of mongoDB i am using is 4.4

any help to resolve this issue is much appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![steve.hoffman](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/steve.hoffman/32/66_2.png) [@steve.hoffman](https://forums.percona.com/u/steve.hoffman)\
**Post date:** [May 29, 2021, 11:13pm UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628/2 "2021-05-29T23:13:25Z")

</div>

Have you tried changing the time window from the default 12 hrs to something like 15 min? I have noticed that newly added systems appear to have not stats until the time window is reduced.

---

<div class="post-metadata">

**Author:** ![bhaskar.avisha](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bhaskar.avisha](https://forums.percona.com/u/bhaskar.avisha)\
**Post date:** [May 29, 2021, 11:37pm UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628/3 "2021-05-29T23:37:54Z")

</div>

Hi Steve,

Yes I did , I tried different options , updated the time , drooped and recreated the user. One thing I noticed if follow the same steps for replica set only , I can see the stats. It’s just that it’s problematic with sharded cluster

Thanks, Bhaskar

---

<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:** [June 1, 2021, 12:30pm UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628/4 "2021-06-01T12:30:35Z")

</div>

Why are you using --skip-connection-check ? that might be hiding some errors. Also I see you are using TLS so you might need the FQDN in the --host argument.  
I would advice you to try the following:

> sudo pmm-admin add mongodb --username mongodb\_exporter --password xxxx --host=[MySha1Rep1.domain.com](http://MySha1Rep1.domain.com) --port=50002 --cluster MyTESTCluster --tls --tls-certificate-key-file=/certlocation/mongo.pem --tls-ca-file=/certlocation/ca.crt

---

<div class="post-metadata">

**Author:** ![bhaskar.avisha](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bhaskar.avisha](https://forums.percona.com/u/bhaskar.avisha)\
**Post date:** [June 1, 2021, 2:28pm UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628/5 "2021-06-01T14:28:20Z")

</div>

@Ivan_Groenewold : i tried using the command as you suggested. issue still exists. i am currently using mongo 4.4 , or are any setting i need to consider when pmm2 is setup ? let me know… thanks

---

<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:** [June 1, 2021, 3:16pm UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628/6 "2021-06-01T15:16:05Z")

</div>

There should be nothing else required. Are you using same client and server versions? I suggest you update both to latest PMM 2.17 to see if it solves the issue.

---

<div class="post-metadata">

**Author:** ![bhaskar.avisha](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bhaskar.avisha](https://forums.percona.com/u/bhaskar.avisha)\
**Post date:** [June 18, 2021, 8:27pm UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628/7 "2021-06-18T20:27:50Z")

</div>

@Ivan_Groenewold : i have updated my PMM Server and Client versions to 2.18 and issue still persist. at this point not sure, what else i can. what i noticed once i a while it show stats for one of the shard and then stops working.

---

<div class="post-metadata">

**Author:** ![bhaskar.avisha](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@bhaskar.avisha](https://forums.percona.com/u/bhaskar.avisha)\
**Post date:** [June 22, 2021, 2:55am UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628/8 "2021-06-22T02:55:43Z")

</div>

@Ivan_Groenewold : i was able to get my dashboard working , i am currently using SSL Certs with combination of SCRM-SHA authentication, i updated my security setting from requireTLS to preferTLS and added mongodb without certs, then the dashboard started working.

Now question is , do i have to make any specific changes with certs for me to access mongo through PMM dashboard.

---

<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:** [June 22, 2021, 11:40am UTC](https://forums.percona.com/t/pmm2-setup-on-a-sharded-cluster-stats-not-displayed/10628/9 "2021-06-22T11:40:14Z")

</div>

Hello, it should work with requireTLS as well. There might be a problem with the client certificate. You can try the pmm-admin add mongodb with --tls-skip-verify to see if it makes any difference, or also the --debug argument.
