mrsarm / mongotail

Command line tool to log all MongoDB queries in a "tail"able way
https://pypi.org/project/mongotail/
GNU General Public License v3.0
192 stars 17 forks source link

Add support for tailing oplog #1

Closed stennie closed 9 years ago

stennie commented 9 years ago

It would be great to add support for tailing the oplog as an alternative to using system profile data.

For a deployment with the oplog enabled (i.e. a replica set, although this can be enabled on a standalone node):

mrsarm commented 9 years ago

Yes, I thought that, but according with oplog documentation, only "operations that modify the data stored in your databases" are recorded, so find or any cursor operations will not saved.

stennie commented 9 years ago

@mrsarm That's correct .. the oplog would only include operations that affect data so you'd still need system profiling for query data.

The format in the oplog also isn't identical to the original query/update, but could still be useful to track changes to data without enabling profiling.