Skip to content

Commit

Permalink
choreL add syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
brnhensley authored Oct 25, 2024
1 parent bb151b1 commit da8c18d
Showing 1 changed file with 45 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The Diagnostics CLI can be installed and run with a single command on Linux and
>
1. Change directory to the application's root directory.
2. Execute the following:
```
```shell
curl -Ls https://download.newrelic.com/nrdiag/scripts/install.sh | bash && sudo ./nrdiag CLI_OPTIONS
```
Recommendation: Scope your troubleshooting with a [task suite](#suites) (`-suites`), and upload relevant files to your New Relic account with the [attachment flag](#automatic) (`-attach`).
Expand All @@ -41,7 +41,7 @@ The Diagnostics CLI can be installed and run with a single command on Linux and
>
1. Change directory to the application's root directory.
2. Execute the following:
```
```powershell
[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls'; (New-Object System.Net.WebClient).DownloadFile("https://download.newrelic.com/nrdiag/scripts/install.ps1", "$env:TEMP\install.ps1"); & PowerShell.exe -ExecutionPolicy Bypass -File $env:TEMP\install.ps1; & '.\nrdiag.exe' CLI_OPTIONS
```
Recommendation: Scope your troubleshooting with a [task suite](#suites) (`-suites`), and upload relevant files to your New Relic account with the [attachment flag](#automatic) (`-attach`).
Expand All @@ -67,7 +67,7 @@ To manually install and run the Diagnostics CLI, follow the procedures for your
3. From the `nrdiag_1.2.3/linux` directory, move `nrdiag` into the application's root directory.
4. Run `nrdiag` (along with any [CLI options](/docs/using-new-relic/cross-product-functions/diagnostics-cli-nrdiag/pass-command-line-options-nrdiag)
```
```shell
./nrdiag CLI_OPTIONS
```
Expand All @@ -91,13 +91,13 @@ To manually install and run the Diagnostics CLI, follow the procedures for your

Run via PowerShell if you add any `CLI_OPTIONS`:

```
```shell
./nrdiag.exe CLI_OPTIONS
```

<DNT>**OR**</DNT>, for x64 systems:

```
```shell
./nrdiag_x64.exe CLI_OPTIONS
```

Expand All @@ -118,7 +118,7 @@ To manually install and run the Diagnostics CLI, follow the procedures for your
3. From the `nrdiag_1.2.3/mac` directory, move `nrdiag` into the application's root directory.
4. Run `nrdiag` (along with any [CLI options](/docs/using-new-relic/cross-product-functions/diagnostics-cli-nrdiag/pass-command-line-options-nrdiag)

```
```shell
./nrdiag CLI_OPTIONS
```

Expand All @@ -133,7 +133,7 @@ To manually install and run the Diagnostics CLI, follow the procedures for your
2. Unzip `nrdiag.zip` if necessary.
3. From the `nrdiag_1.2.3/`OS directory, run `nrdiag` (along with any [CLI options](/docs/using-new-relic/cross-product-functions/diagnostics-cli-nrdiag/pass-command-line-options-nrdiag):

```
```shell
./nrdiag -browser-url WEBSITE_URL CLI_OPTIONS
```

Expand All @@ -149,17 +149,17 @@ To manually install and run the Diagnostics CLI, follow the procedures for your
1. [Download](https://download.newrelic.com/nrdiag/nrdiag_latest.zip) and unzip the `nrdiag_latest.zip` file.
2. Copy the binary to the container. Replace `IMAGE_NAME` with the name of your docker container:

```
```shell
docker cp nrdiag/linux/nrdiag IMAGE_NAME:/bin
```
3. Run the `nrdiag` command in the docker container. Replace `IMAGE_NAME` as above, and replace `APPLICATION_ROOT` with the root directory of your application, where you installed the New Relic agent:

```
```shell
docker exec -it -w APPLICATION_ROOT IMAGE_NAME nrdiag
```
4. (Optional) Remove the `nrdiag` binary when finished:

```
```shell
docker exec IMAGE_NAME rm /bin/nrdiag
```
</Collapser>
Expand All @@ -171,7 +171,7 @@ A suite is a collection of health checks that target specific products or issues

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

```
```shell
./nrdiag -help suites
```

Expand All @@ -183,12 +183,12 @@ To run suites with `nrdiag`, provide the `-suites` flag and one or more suite na

* For 64-bit systems:

```
```shell
./nrdiag_x64 -suites SUITE NAMES
```
* For ARM64 systems:

```
```shell
./nrdiag_arm64 -suites SUITE NAMES
```

Expand All @@ -200,17 +200,17 @@ To run from PowerShell, add `./` to the start of `cmd`.

* For 32-bit systems:

```
```shell
nrdiag.exe -suites SUITE NAMES
```
* For 64-bit systems:

```
```shell
nrdiag_x64.exe -suites SUITE NAMES
```
* For ARM64 systems:

```
```shell
nrdiag_arm64.exe -suites SUITE NAMES
```

Expand All @@ -230,14 +230,14 @@ The results of running a script can be found in the `nrdiag-output.json` file wi
```json
"Script": {
"Name": "example",
"Description": "Example Description",
"Output": "example output",
"OutputFiles": [
"/path/to/example.out",
"/path/to/another-file.out"
],
"OutputTruncated": false
"Name": "example",
"Description": "Example Description",
"Output": "example output",
"OutputFiles": [
"/path/to/example.out",
"/path/to/another-file.out"
],
"OutputTruncated": false
}
```
Expand All @@ -254,7 +254,7 @@ A list of files the script created can be found in the `Outputfiles` field.
>
To view a list of the scripts available to run, use `-list-scripts`:
```
```shell
./nrdiag -list-scripts
```
</Collapser>
Expand All @@ -265,7 +265,7 @@ A list of files the script created can be found in the `Outputfiles` field.
>
To view a script without running it:
```
```shell
./nrdiag -script SCRIPT_NAME
```
</Collapser>
Expand All @@ -276,7 +276,7 @@ A list of files the script created can be found in the `Outputfiles` field.
>
To run a script:
```
```shell
./nrdiag -script SCRIPT_NAME -run
```
</Collapser>
Expand All @@ -287,7 +287,7 @@ A list of files the script created can be found in the `Outputfiles` field.
>
To run a script with arguments:
```
```shell
./nrdiag -script SCRIPT_NAME -run -script-flags "-foo bar"
```
</Collapser>
Expand All @@ -298,7 +298,7 @@ A list of files the script created can be found in the `Outputfiles` field.
>
To run a script and suites at the same time:
```
```shell
./nrdiag -script SCRIPT_NAME -run -s SUITE NAMES"
```
</Collapser>
Expand All @@ -316,12 +316,12 @@ Use this in combination with `-attach` to [upload the files](#attach-account-res
* For 64-bit systems:
```
```shell
./nrdiag_x64 -include /entire/directory/ -attach
```
* For ARM64 systems:
```
```shell
./nrdiag_arm64 -include /entire/directory/ -attach
```
Expand All @@ -333,19 +333,19 @@ To run from PowerShell, add `./` to the start of `cmd`.
* For 32-bit systems:
```
```shell
nrdiag.exe -include Path\To\File -attach
```
* For 64-bit systems:
```
```shell
nrdiag_x64.exe -include \Entire\Directory\ -attach
```
* For ARM64 systems:
```
```shell
nrdiag_arm64.exe -include \Entire\Directory\ -attach
```
Expand All @@ -368,24 +368,24 @@ Uploading your results to an account will automatically upload the contents of t
>
* For 64-bit systems:
```
```shell
./nrdiag_x64 -attach
```
OR
```
```shell
./nrdiag_x64 -api-key ${API_KEY}
```
* For ARM64 systems:
```
```shell
./nrdiag_arm64 -attach
```
OR
```
```shell
./nrdiag_arm64 -api-key ${API_KEY}
```
</Collapser>
Expand All @@ -398,35 +398,35 @@ Uploading your results to an account will automatically upload the contents of t
* For 32-bit systems:
```
```shell
nrdiag.exe -attach
```
OR
```
```shell
nrdiag.exe -api-key ${API_KEY}
```
* For 64-bit systems:
```
```shell
nrdiag_x64.exe -attach
```
OR
```
```shell
nrdiag_x64.exe -api-key ${API_KEY}
```
* For ARM64 systems:
```
```shell
nrdiag_arm64.exe -attach
```
OR
```
```shell
nrdiag_arm64.exe -api-key ${API_KEY}
```
</Collapser>
Expand All @@ -436,6 +436,6 @@ Uploading your results to an account will automatically upload the contents of t
By default, the Diagnostics CLI uploads results to New Relic accounts hosted in the US data center. If your account is hosted in the EU data center, ensure to add `-region eu` to the command.
```
```shell
./nrdiag -region eu ...
```

0 comments on commit da8c18d

Please sign in to comment.