Profiling in MongoDB

Hi There,

Planning to enable profiling on all the databases? Is there any way to do it collectively instead of doing it for every database individually?

Thanks

For development purposes in testing environments, you can enable database profiling for an entire mongod instance. The profiling level applies to all databases provided by the mongod instance.

To enable profiling for a mongod instance, pass the following options to mongod at startup.

mongod --profile 1 --slowms 15 --slowOpSampleRate 0.5

Check this doc

Thanks. I want to do it on production instances to capture queries taking more than 1 second across all the databases.

Apart from Profiling, I do have opLatencies to measure the number of queries that are being slow. What is threshold for that? I mean if I have 1K counter on opLatenies this 1K violates how much seconds?