Docs Menu

View and Download MongoDB Logs

On this page

  • Procedure
  • Database Access Logs

Each mongod, mongos, and mongosqld tier keeps an account of its activity in its own log file. Atlas retains the last 30 days of log messages and system event audit messages for each tier in a cluster. The Performance Advisor retains at most 7 days of logs for each process in a cluster.

Important

You must have Project Data Access Read Only privileges or greater to download logs.

Note

M0 free clusters and M2/M5 shared clusters do not provide downloadable logs.

To download the logs for a single process in a given cluster:

1

If you do not see the cluster you want on the page, ensure you have selected the proper Project.

2
  1. Click the ellipsis icon (...) next to the cluster containing the mongod instance whose logs you want to download.
  2. Select Download Logs.
3
Important

If you have not set a project time zone, the returned log data may not respect the configured date range. See Manage Project Settings.

Field
Content
Select process

Select the process for which you want logs. Valid options are:

Option
Description
mongod
Database server logs.
mongod-audit-log
Database auditing logs. Note: this option only appears if you have database auditing enabled for your cluster.
mongos
mongos logs. Note: this option only appears if your cluster is sharded.
mongos-audit-log
mongos auditing logs. Note: this option only appears if your sharded cluster has auditing enabled.
mongosqld
BI Connector logs. Note: this option only appears if you have BI Connector enabled for your cluster.
Select server
Select the server in the cluster whose logs you want to retrieve.
Start Time
Specify the date and time in your group's time zone defining the inclusive lower bound of log activity to return. The start time must be less than 30 days ago.
End Time
Specify the date and time in your group's time zone defining the inclusive upper bound of log activity to return.
4

For information on reading MongoDB logs, refer to the Log Messages documentation in the MongoDB manual.

Note
Feature unavailable in Free and Shared-Tier Clusters

This feature is not available for M0 free clusters, M2, and M5 clusters. To learn more about which features are unavailable, see Atlas M0 (Free Cluster), M2, and M5 Limitations.

You can view authentication attempts that were made against your cluster. Both successful and unsuccessful attempts are logged, including the timestamp of the attempt and which user tried to authenticate.

←  Integrate with PrometheusIntegrate Products and Services →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.