Docs Menu
Docs Home
MongoDB Atlas

View and Download MongoDB Logs

On this page

  • Required Access
  • View and Download Cloud Deployment Logs
  • View Local Deployment Logs with the Atlas CLI
  • Database Access Logs

Each mongod, mongos, and mongosqld instance 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. The Performance Advisor retains at most 7 days of logs. If you terminate a cluster, the logs that cluster generated persist, and you can download these logs at any point until the end of their retention periods.


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

To download logs, you must have Project Data Access Read Only access or higher to the project. Users with Organization Owner access must add themselves to the project as a Project Owner.

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

To view the logs for a deployment using the Atlas CLI, run the following command:

atlas deployments logs [options]

To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas deployments logs.


See: Related Links


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

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.

← Prometheus