Monitoring at collection level

Hii community currently, I was exploring about the monitoring who is accessing my database and what modifications are they performing.
I came to know that, setProfilingLevel(2) stores those information about it. It helps me to know that which command is fired on which collection & also by whom.

My question is regarding the same, currently I want to fetch who is performming CRUD operations on my collections (let’s say users) and I am unable to keep track of this.
Can someone from community guide me, how to establish a system to monitor CRUD operations performed on my users collection?

who? do you mean the user and/or role performing the operations? then you may want to check

i don’t recall there’s such monitoring capability in community version.

Of course, you can also try building a proxy layer in front of your mongodb nodes, so that you can inspect every request (provided the authentication info is available in the request packet)

Hi @Mehul_Sanghvi. Thank you for being a part of the MongoDB community!

As you mentioned, the mongod logs do include information about the namespace and metadata about the client issuing each profiled operation. You may be able to parse out the client metadata and the namespace information to keep track of this information.


I am using atlas version of mongodb. And I think auditing is quite expensive.