Hi @Prasad_Kini,
These are great questions!
- The Atlas Query Profiler will not display the same information on all 3 nodes. The Atlas Query Profiler is node-specific and is showing you slow operations specific to the node you are viewing. When you’re viewing the Query Profiler from the “cluster” view, it’s actually showing you the slow operations for the primary node.
- You can use the setProfilingLevel command to capture all queries, even in the Atlas Query Profiler. However, one warning worth mentioning is that this could add significant load to your cluster and could result in the Atlas Query Profiler hitting rate limits that prevent it from profiling further slow operations. This would essentially prevent Atlas Query Profiler from showing any more slow operations for the rest of the 24 hour monitoring period. With this in mind, you can use the setProfilingLevel command by setting the level to 2 and setting the slowms option to 0.
- Yes, stats for your aggregation would be captured in a single document. Additionally, in the Atlas Query Profiler, we provide visibility into this in the Query Details view, which allows you to see the different stages and overall statistics.
- That’s right, what’s captured in the Atlas Profiler is different from db.system.profile. In general, the Atlas Profiler captures a subset of the db.system.profile collection. The Atlas Profiler reads from the slow logs rather than from the system.profile collection.
Hope this helps!
Thanks,
Frank