Here’s a well-framed question you can post to the MongoDB community forums or Stack Overflow:
Tracking All MongoDB Read Operations Without Performance Impact (Free Solution)
I’m trying to implement a system to track all read-only operations on our MongoDB deployment with the following constraints:
##Requirements:
- Need to track all read operations (find, aggregate, etc.) hitting our MongoDB server
- Solution must be free (no MongoDB Enterprise/Atlas features)
- Minimal performance impact on production workload
- Complete coverage of operations from all clients/applications
What I’ve already tried:
- system.profiler: Too much performance impact when tracking all operations
- currentOp(): Missing many read operations due to their short lifecycle
- MongoDB logs: Difficult to parse efficiently and adds I/O overhead
- Change streams: Don’t capture read-only operations
- Driver command monitoring: Only captures operations from the specific application instance where it’s implemented
Has anyone successfully implemented a solution for comprehensive read operation tracking in a similar environment? What approach would you recommend given my constraints?