james007
james007

Reputation: 741

Mongo _Audit Collection

Usually in RDBMS we will have _Audit table for every table. For example.. table:Login columns: username, password, lastlogin,preference1,preference2 etc.

table: Login_Audit will have the values before got modified. This will have history of all the changes and will get purged once in 2 weeks or month. Usually the _Audit table entry will be made by triggers. columns: username, password, lastlogin,preference1,preference2 etc., modifiedby, modifiedtime

Just like _audit table in Rdbms, how to maintain who create the document, LastmodifiedUser, lastmodifiedtime.. etc. It should be fine if i can able to maintain these information in same collection itself.

Upvotes: 0

Views: 64

Answers (1)

wdberkeley
wdberkeley

Reputation: 11671

MongoDB, at present (2.6), doesn't have any auditing features. There are auditing features in MongoDB Enterprise (i.e. these features aren't free). The auditing system tracks events like the following, on a per connection/user basis:

  • authentication
  • creating and dropping collections
  • creating and dropping indexes
  • creating and deleting users
  • creating, deleting, modifying, and granting roles
  • replica set reconfiguration
  • sharding administration actions
  • server shutdowns

Upvotes: 1

Related Questions