Get the number of elements in a mongo pool

Hello,

I need to get the number of elements in a mongo pool, today I loop on MongoInternals.defaultRemoteCollectionDriver().mongo.db.s.client.topology.s.servers.s.pool.{SYMBOL} and I get “_tail” or “_head” key to display the information.

When I try to update mongodb server, this feature doesn’t work anymore, I try to use this command MongoInternals.defaultRemoteCollectionDriver().mongo.db.command({ connPoolStats: 1 }, callback) and loop on “hosts” key but the “inuse” or “available” values are always constant.

Is there an API to get the number of element into a mongo pool please ?

Thanks.

Ygles