Number of collections not visible in mongodb

getting this error in logs of pmm-client

level=error msg="cannot get $collstats cursor for collection db1 : context deadline exceeded

Hello @Pramod_Kumar_Gupta, could you provide more details?

  1. Steps to reproduce
  2. Number of DBs and Collections in your service
  3. Did you enable all collectors?

Thank you

yes i have enbaled all collectors. I have very large number of dbs and collection alomost more than 2000.

I have the run the pmm server in docker and client is alos running in docker and mongo cluster also.

for adding i am using this

pmm-admin add mongodb --username=pmm --password=pmm --host=mongo2 mongo2 --query-source=profiler --replication-set=myReplicaSet --cluster=P1 --enable-all-collectors --max-collections-limit=50000

pmm-admin add mongodb --username=pmm --password=pmm --host=mongo3 mongo3 --query-source=profiler --replication-set=myReplicaSet --cluster=P1 --enable-all-collectors --max-collections-limit=50000

pmm-admin add mongodb --username=pmm --password=pmm --host=mongo1 mongo1 --query-source=profiler --replication-set=myReplicaSet --cluster=P1 --enable-all-collectors --max-collections-limit=50000

got it, I recommend to increase metrics resolution, especially low resolution as it takes some time to collect collstats. Configure - Percona Monitoring and Management