mongo Schema Audit Messages
On this page
In the mongo
schema, recorded log messages have this syntax:
{ atype: <string>, ts : { $date: <timestamp> }, uuid : { $binary: <string>, $type: <string> }, local: { ip: <string>, port: <int> || isSystemUser: <boolean> || unix: <string> }, remote: { ip: <string>, port: <int> || isSystemUser: <boolean> || unix: <string> }, users : [ { user: <string>, db: <string> }, ... ], roles: [ { role: <string>, db: <string> }, ... ], param: <document>, result: <int> }
Field | Type | Description |
---|---|---|
| string | Action type. See Audit Event Actions, Details, and Results. |
| document | Document that contains the date and UTC time of the event, in ISO 8601 format. |
| document | A document that contains a message identifier. The UUID identifies a client connection. Use the UUID to track audit events connected to that client. The value of the New in version 5.0. |
| document | A document that contains the Starting in MongoDB 5.0, can alternatively be a document with one of these fields:
Starting in MongoDB 5.0, the Changed in version 5.0. |
| document | A document that contains the Starting in MongoDB 5.0, can alternatively be a document with one of these fields:
Changed in version 5.0. |
| array | Array of user identification documents. Because MongoDB allows a
session to log in with different user per database, this array can
have more than one user. Each document contains a |
| array | Array of documents that specify the roles granted to the user. Each document contains a
|
| document | Specific details for the event. See Audit Event Actions, Details, and Results. |
| integer | Error code. See Audit Event Actions, Details, and Results. |
Audit Event Actions, Details, and Results
The following table lists for each atype
or action type, the
associated param
details and the result
values, if any.
atype | param | result | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Starting in MongoDB 5.0,
Changed in version 5.0. | 0 - Success18 - Authentication Failed334 - Mechanism Unavailable337 - Authentication Abandoned | |||||||||||||||||||||||||
|
ns field is optional.args field may be redacted.By default, the auditing system logs only the authorization
failures. To enable the system to log authorization successes,
use the Enabling Starting in MongoDB 5.0, Changed in version 5.0. | 0 - Success13 - Unauthorized to perform the operation. | |||||||||||||||||||||||||
|
Contains the client metadata. Logged when the client runs the
For more details, see Client Data. New in version 5.0. |
| |||||||||||||||||||||||||
Logged when a:
Starting in MongoDB 5.0, this additional information is logged for a view:
Changed in version 5.0. |
| ||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
Possible values for
Starting in MongoDB 5.0,
Changed in version 5.0. | 0 - Success276 - Index build aborted.The audit message contains result code | ||||||||||||||||||||||||||
|
Logged when a database operation directly modifies the contents
of the New in version 5.0. |
| |||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
Logged when a:
Starting in MongoDB 5.0, this additional information is logged for a view:
In addition, starting in MongoDB 5.0, a
Changed in version 5.0. | 0 - Success26 - NamespaceNotFound If the collection or view does not exist, the audit message shows
the return code as | ||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
The |
| ||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
|
Logged when a parameter is changed because of:
|
| |||||||||||||||||||||||||
|
The |
| |||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
The For details on the resource document, see Resource Document on Self-Managed Deployments. For a list of actions, see Privilege Actions for Self-Managed Deployments. |
| ||||||||||||||||||||||||||
|
The For details on the resource document, see Resource Document on Self-Managed Deployments. For a list of actions, see Privilege Actions for Self-Managed Deployments. |
| |||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
|
For details on the resource document, see Resource Document on Self-Managed Deployments. For a list of actions, see Privilege Actions for Self-Managed Deployments. |
| |||||||||||||||||||||||||
|
For details on the resource document, see Resource Document on Self-Managed Deployments. For a list of actions, see Privilege Actions for Self-Managed Deployments. |
| |||||||||||||||||||||||||
|
For details on the replica set configuration document, see Self-Managed Replica Set Configuration. |
| |||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||
When a shard is a replica set, the |
| ||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
Indicates commencement of database shutdown. |
| ||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
|
New in version 5.0. |
| |||||||||||||||||||||||||
|
New in version 5.0. Changed in version 6.1. |
|