If I created 3 mongodb users: user1, user2, user3, as a mongodb admin with root privilege. Is there any way that I can check the login (as well as usage) history of these users?

2 Answers 2


The MongoDB log files will record information information showing when a database user authenticates; the log messages will look like the following:

2017-06-28T11:38:50.866-0700 I ACCESS   [conn75] Successfully authenticated as principal mydbuser on mydb

A full usage history of each user would require auditing as JJussi mentioned.


Yes (but..). You need to enable auditing, what is (sadly) enterprise feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.