mongocli ops-manager diagnose-archive download

On this page

The diagnose-archive download command downloads a diagnostic archive for the specified Ops Manager project to a .tar.gz file. You can also download diagnostic archives through the Ops Manager API.


mongocli ops-manager|om diagnose-archive download|get
     [ --limit <max-number-of-entries> ]
     [ --minutes <number-of-minutes-ago> ]
     [ --out <file-destination> ]
     [ --profile|-P <profile-name> ]
     [ --projectId <id-of-project> ]


Option Type Description Required?
--limit integer Maximum number of entries for the diagnostic archive. no
--minutes integer

Time range of the diagnostic archive, beginning at the specified number of minutes in the past and ending at the present time.


To retrieve a diagnostic archive with data for the last 10 minutes, specify --minutes 10.

--out, -o string Output filename or path to filename. If omitted, the diagnostic archive is downloaded to your current directory as diagnose-archive.tar.gz. no
--profile, -P string Name of the profile where the public and private keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. no
--projectId string

Unique identifier of the project containing the diagnostic archive you want to download. If omitted, uses the project ID in the profile or the environment variable.


You can retrieve the list of projects, including their IDs, using the mongocli iam project list command.



The command downloads the diagnostic archive of the specified Ops Manager project to:

  • The current directory as a file named diagnose-archive.tar.gz, or
  • A directory and filename you specify with the --out option.

If the command returns an error, see Troubleshooting for recommended solutions.


The following example uses the mongocli ops-manager diagnose-archive download command to download the diagnostic archive for an Ops Manager project. The command uses the default profile, which stores the project ID and the Programmatic API Keys.

mongocli ops-manager diagnose-archive download

The previous command downloads the log file diagnose-archive.tar.gz to the current directory.