• /
  • Log in

Pass command line options for nrdiag

To use the following command line options with the Diagnostics CLI:

Option

Usage

-attachment-endpoint STRING

Attachment endpoint to include with the support ticket.

-a STRING

-attachment-key STRING

Attachment key for automatic upload to a support ticket. This gets the attachment key from an existing 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). To 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 for the support ticket. 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, or Info. Example syntax:

\"Success,Warning,Failure"

-h

--help

Display complete list of command line options. To list all tasks to be run, use -h tasks. Type: bool

-inNewRelicCLI

Type: bool

-interactive

Type: bool

-output-path STRING

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

-o

--override STRING

Pass in arguments to override when requested by New Relic Support. Format: identifier.property=value.

Example syntax:

--override Java/Config/Agent.Status=Success
-o Base/Config/Validate.agentlanguage=PHP

-p STRING

--proxy STRING

Provide proxy to be used in HTTP connection tasks. Can be HTTP or HTTPS. Proxy should be in the format http(s)://proxyIp:proxy. If the Diagnostics CLI finds a proxy in the agent config file, it will use that proxy by default. In most cases port is not needed. 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.

-q

--quiet

Quiet output only prints the high-level results and not the explanatory output. Suppresses file addition warnings if -y is also used. Does not contradict -v. Inclusion filters are ignored. Type: bool

-qq

--VeryQuiet

Very quiet output only prints a single summary line for output (implies q). Suppresses file addition warnings if -y is also used. Does not contradict -v. Inclusion filters are ignored. Type: bool

--SkipVersionCheck

Skip the automatic check for a newer version of the application. Type: bool

--ShowOverrideHelp

Type: bool

-s STRING

--suites STRING

Run a suite, a collection of tasks that target specific products or issues. To specify multiple suites, separate them with commas. To get 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. To specify multiple tasks, separate them with commas and/or with a wildcard *. 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. Type: bool

-v

--verbose

Display verbose logging during check execution. Disabled by default. Type: bool

--version

Displays current Diagnostics CLI version. This also prompts to check for a newer version and prompts to download if a newer version is available. Takes precedence over no-version-check. Type: bool

-y

--yes

--YesToAll

Respond yes to any prompt that comes up while running. Disabled by default. Type: bool

For more help

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

Create issueEdit page
Copyright © 2021 New Relic Inc.