• /
  • Log in
  • Free account

Pass command line options for nrdiag

You can use the following command line options with the Diagnostics CLI:

Option

Usage

-a STRING

-attachment-key STRING

Attachment key for automatic upload to a support ticket.

-browser-url STRING

Diagnostics CLI version 1.1.9 or higher

When invoked, this will only run diagnostics checks related to browser monitoring. This command checks that New Relic's browser monitoring agent is present and returns the agent version, the injection method (via APM or via copy/paste), and the loader type (Pro, Lite, SPA). This can be used to provide detail to New Relic Support when troubleshooting intranet sites.

-c STRING

-config-file STRING

Override default agent configuration file location. Can be used to specify either a folder to search in addition to the default folders, or a path to a specific configuration file.

-file-upload STRING

Diagnostics CLI version 1.1.8 or higher

Requires running with -a option. Allows upload of a single file at the path specified. This is in addition to files collected by default.

--filter STRING

Filter task results by result status. Accepts a comma separated list. Accepts: Success, Warning, Failure, Error, None.

-h

--help

Displays full list of options. -help tasks will provide a full list of available tasks.

-output-path STRING

Specifies a different directory to write the results (nrdiag-output.zip, nrdiag-output.json and nrdiag-filelist.txt). Default location is ./

-o

--override

Pass in arguments to override. This should generally only be done when requested by New Relic Support.

Example syntax:

--override Java/Config/Agent.Status=Success

-p STRING

--proxy STRING

Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format https://PROXY_IP:PROXY_PORT. If the Diagnostics CLI finds a proxy in the agent config file, it will use that proxy by default.

-proxy-pw STRING

Proxy password, if necessary. If the Diagnostics CLI finds a proxy in the agent config file, it will use that proxy by default.

-proxy-user STRING

Proxy username, if necessary. If the Diagnostics CLI finds a proxy in the agent config file, it will use that proxy by default.

-s STRING

--suites STRING

Run a suite, a collection of tasks that target specific products or issues. You can specify multiple suites by separating them with commas. For a list of all suites, run:

./nrdiag -h suites

-t STRING

--tasks STRING

Run only a subset of tasks, either by agent or by task type. You can specify multiple tasks by separating them with commas. For a list of all tasks, run:

./nrdiag -h tasks

-usage-opt-out

Decline to send anonymous Diagnostics CLI tool usage data to New Relic for this run.

-v

--verbose

Display verbose logging during check execution. Disabled by default.

--version

Display current Diagnostics CLI version. This also prompts to check for a newer version and prompts to download if a newer version is available.

-y

--yes

Say yes to any prompt that comes up while running. Disabled by default.

For more help

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

Create issueEdit page
Copyright © 2021 New Relic Inc.