• /
  • Log in
  • Free account

Run the Diagnostics CLI (nrdiag)

Download latest version

To use the Diagnostics CLI:

  1. Review the release notes, to make sure you have the latest version.
  2. Download the latest version, which contains executable files for Linux, macOS, and Windows.
  3. Move the executable for your platform into the location of your application's root directory.
  4. Temporarily raise the logging level for the New Relic agent for more accurate troubleshooting. After you change the logging level, restart your application.
  5. Run the executable. Recommendation: To scope your troubleshooting more easily, run nrdiag with a task suite (CLI option).

The Diagnostics CLI automatically searches its root directory and subdirectories for agent configuration files and other relevant data.

Platform-specific procedures

To run the Diagnostics CLI, follow the procedures for your platform:

Suites flag (highly recommended CLI option)

A suite is a collection of health checks that target specific products or issues. Using a suite can help narrow the scope of troubleshooting and reduce the occurrence of false positives.

To review a list of available suites, run the Diagnostics CLI with the -help suites option:

./nrdiag --help suites

To run suites with nrdiag, provide the -suites flag and one or more suite names (for example, java) to run as arguments.

Linux, macOS:

  • For 32-bit systems:

    ./nrdiag --suites SUITE NAMES
  • For 64-bit systems:

    ./nrdiag_x64 --suites SUITE NAMES

Windows:

To run from PowerShell, add ./ to the start of cmd.

  • For 32-bit systems:

    nrdiag.exe --suites SUITE NAMES
  • For 64-bit systems:

    nrdiag_x64.exe --suites SUITE NAMES

View or copy attachment key

New Relic Support generates an attachment key for your support ticket, which is used with the Diagnostics CLI. To view or copy your attachment key:

  1. Log in to your New Relic account at one.newrelic.com.
  2. At the top of any page, click the question icon, click View support tickets, and then select the appropriate support ticket.
  3. Copy the NR Diagnostics attachment key that appears at the top of the ticket.
  4. Use this attachment key to upload your Diagnostics CLI results to your support ticket.

If you do not see the attachment key code, notify Support.

Upload results to a support ticket

Important

If your system is configured to not connect to external IP addresses, this method will not work. Instead, attach the output files in an email to New Relic Support.

Automatic upload

To upload your results automatically to a New Relic Support ticket when the Diagnostics CLI is executed, use the -attachment-key command line flag with your ticket's attachment key.

Uploading your results to a support ticket will automatically upload the contents of nrdiag-output.zip. If you want to inspect or modify the file's contents before upload, follow the manual upload procedures.

Linux, macOS, synthetic private minion:

./nrdiag -attachment-key ATTACHMENT_KEY

Windows:

To run from PowerShell, add ./ to the start of cmd.

  • For 32-bit systems:

    nrdiag.exe -attachment-key ATTACHMENT_KEY
  • For 64-bit systems:

    nrdiag_x64.exe -attachment-key ATTACHMENT_KEY

Manual upload

If you modified or inspected the content of nrdiag-output.zip and want to attach it to a support ticket, you can use the -file-upload and -attachment-key command line flags together to upload a specific file:

./nrdiag -attachment-key ATTACHMENT_KEY -file-upload ZIP_FILENAME

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.