Pmm2 setup on a sharded cluster - stats not displayed

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

  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.


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.

1 Like

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

1 Like

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 --port=50002 --cluster MyTESTCluster --tls --tls-certificate-key-file=/certlocation/mongo.pem --tls-ca-file=/certlocation/ca.crt

1 Like

@igroene : 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

1 Like

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.

1 Like

@igroene : 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.