0

I'm new to MongoDB and need some help to understand how profiler works with replication in Mongo.

I have a replica set with three instances and the secondaries are used for read only by the application. When I try to profile by connecting to the cluster it only returns commands issued on the primary. How can I get all commands, especially the ones which were executed on the secondaries replica set?

vyosiura
  • 41
  • 6

1 Answers1

1

I found out the answer in the documentation:

You can enable and configure profiling for individual databases or for all databases on a mongod instance. Profiler settings affect only a single mongod instance and will not propagate across a replica set or sharded cluster.

vyosiura
  • 41
  • 6