• Log inStart now

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 and 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

Include additional files in the zip

If you have additional files that you would like to share with support, you can include them in the nrdiag-output.zip file using the -include command line flag. This can be used with a single file or a directory. If a directory is provided, all of its subdirectories are included. The total size limit of the files included is 4GB.

Use this in combination with -attach to upload the files to your New Relic account.

Linux and macOS:

  • For 32-bit systems:

    ./nrdiag -include ./path/to/file -attach
  • For 64-bit systems:

    ./nrdiag_x64 -include /entire/directory/ -attach

Windows:

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

  • For 32-bit systems:

    nrdiag -include Path\To\File -attach
  • For 64-bit systems:

    nrdiag_x64.exe -include \Entire\Directory\ -attach

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 also need to send your output files in an email to support.

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.

Linux and macOS:

  • For 32-bit systems:

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

    ./nrdiag_x64 -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
Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.