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
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.