Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli ops-manager diagnose-archive download

On this page

  • Syntax
  • Options
  • Output
  • Examples

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> ]
[ --output|-o <output-format> ]
[ --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.

Example

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

no
--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
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format

  • go-template for custom output using the Go template

  • go-template-file for custom output specified using Go template file

If omitted, the command returns output in the default format.

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. If omitted, uses the project ID in the profile or environment variable.

Note

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

no

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.

Back

Diagnostic Archives