• /
  • 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

Upload results to a New Relic account

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. If there is an issue with your license key you will need to manually upload results to your account.

Automatic Account upload

To upload your results automatically to a New Relic account when the Diagnostics CLI is executed, use the -attach or -a command line flag. This will validate any New Relic License Keys found in your environment for upload.

Uploading your results to an account will automatically upload the contents of the nrdiag-output.json and 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 -attach

Windows:

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

  • For 32-bit systems:

    nrdiag.exe -attach
  • For 64-bit systems:

    nrdiag_x64.exe -attach

Manual upload

If you have a support ticket, use the permalink functionality to share your results. This will help improve troubleshooting speed. The New Relic diagnostics app has the drag and drop functionality if your results are unable to be automatically uploaded.

For more help

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

Create issueEdit page
Copyright © 2021 New Relic Inc.