How to audit MongoDB?

1 minute read time.

Have you ever had a need to find out who changed the web server user? Maybe you wanted to find out who gave admin rights to a user?

While this feature is not available in current version V11, it's available in Enterprise management Cloud and also next version of V12(so maybe this entice you keep a look out for V12).

There is a new menu under Administration called MongoDB traceability and here is how you can use it.

  1. Open Administration, Administration, Settings, Global setting.
  2. Click Edit.
  3. Scroll down to History section .
  4. Check mark Enable for users code, this will enable traces for users, groups and roles.

  5. Click Save.
  6. Open Administration, Administration, Users, Users.
  7. Select an existing user and make a change to that user and Save.
  8. Now open Administration, Usage, Logs, MongoDb traceability.
  9. Notice that you have a line that represents the change that was done to the user.



  10. Click on action on that line and select Details.
  11. Notice that you will see below for example, which indicates the first name for that user was changed by admin.

Notice that there are other things that could be traced beside users, by enabling other codes in global settings.

Conclusions: Starting with V12 you can trace changes that was done to entities in administration menu