From 5d92431d676ff827690b632b04f14fc9d19cab1c Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:35:14 -0700 Subject: [PATCH 01/17] chore: format codeblocks --- ...structure-agent-configuration-settings.mdx | 166 +++++++++--------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/src/content/docs/infrastructure/install-infrastructure-agent/configuration/infrastructure-agent-configuration-settings.mdx b/src/content/docs/infrastructure/install-infrastructure-agent/configuration/infrastructure-agent-configuration-settings.mdx index 1adfa883942..645331f7d00 100644 --- a/src/content/docs/infrastructure/install-infrastructure-agent/configuration/infrastructure-agent-configuration-settings.mdx +++ b/src/content/docs/infrastructure/install-infrastructure-agent/configuration/infrastructure-agent-configuration-settings.mdx @@ -3500,26 +3500,26 @@ Metrics can also be enriched with extended cloud metadata (including custom reso In this example, we exclude process metrics using executable files and names: - ``` - exclude_matching_metrics: # You can combine attributes from different metrics - process.name: - - regex "^java" # Exclude all processes starting with "java" - process.executable: - - "/usr/bin/python2" # Exclude the Python 2.x executable - - regex "\\System32\\svchost" # Exclude all svchost executables + ```yml + exclude_matching_metrics: # You can combine attributes from different metrics + process.name: + - regex "^java" # Exclude all processes starting with "java" + process.executable: + - "/usr/bin/python2" # Exclude the Python 2.x executable + - regex "\\System32\\svchost" # Exclude all svchost executables ``` To configure `exclude_matching_metrics` as an environment variable for the [Kubernetes integration](/docs/kubernetes-pixie/kubernetes-integration/get-started/introduction-kubernetes-integration/), add it in the manifest inside the `env:` object: ```yml env: - - name: NRIA_EXCLUDE_MATCHING_METRICS - value: | - process.name: - - regex "^java" - process.executable: - - "/usr/bin/python2" - - regex "\\System32\\svchost" + - name: NRIA_EXCLUDE_MATCHING_METRICS + value: | + process.name: + - regex "^java" + process.executable: + - "/usr/bin/python2" + - regex "\\System32\\svchost" ``` Default @@ -5940,83 +5940,83 @@ If you are having problems with proxy configuration, see [Proxy troubleshooting] ```bash curl http://localhost:8003/v1/status - { - "checks": { - "endpoints": [ - { - "url": "https://infrastructure-command-api.newrelic.com/agent_commands/v1/commands", - "reachable": true - }, - { - "url": "https://infra-api.newrelic.com/infra/v2/metrics", - "reachable": true - }, - { - "url": "https://identity-api.newrelic.com/identity/v1", - "reachable": true - }, - { - "url": "https://infra-api.newrelic.com/inventory", - "reachable": true - } - ] - }, - "config": { - "reachability_timeout": "10s" - } - } + [output] { + [output] "checks": { + [output] "endpoints": [ + [output] { + [output] "url": "https://infrastructure-command-api.newrelic.com/agent_commands/v1/commands", + [output] "reachable": true + [output] }, + [output] { + [output] "url": "https://infra-api.newrelic.com/infra/v2/metrics", + [output] "reachable": true + [output] }, + [output] { + [output] "url": "https://identity-api.newrelic.com/identity/v1", + [output] "reachable": true + [output] }, + [output] { + [output] "url": "https://infra-api.newrelic.com/inventory", + [output] "reachable": true + [output] } + [output] ] + [output] }, + [output] "config": { + [output] "reachability_timeout": "10s" + [output] } + [output] } ``` Main status endpoint (with errors): ```bash curl http://localhost:8003/v1/status - { - "checks": { - "endpoints": [ - { - "url": "https://staging-infra-api.newrelic.com/infra/v2/metrics", - "reachable": false, - "error": "endpoint check timeout exceeded" - }, - { - "url": "https://infra-api.newrelic.com/infra/v2/metrics", - "reachable": true - }, - { - "url": "https://identity-api.newrelic.com/identity/v1", - "reachable": true - }, - { - "url": "https://infra-api.newrelic.com/inventory", - "reachable": true - } - ] - }, - "config": { - "reachability_timeout": "10s" - } - } + [output] { + [output] "checks": { + [output] "endpoints": [ + [output] { + [output] "url": "https://staging-infra-api.newrelic.com/infra/v2/metrics", + [output] "reachable": false, + [output] "error": "endpoint check timeout exceeded" + [output] }, + [output] { + [output] "url": "https://infra-api.newrelic.com/infra/v2/metrics", + [output] "reachable": true + [output] }, + [output] { + [output] "url": "https://identity-api.newrelic.com/identity/v1", + [output] "reachable": true + [output] }, + [output] { + [output] "url": "https://infra-api.newrelic.com/inventory", + [output] "reachable": true + [output] } + [output] ] + [output] }, + [output] "config": { + [output] "reachability_timeout": "10s" + [output] } + [output] } ``` Errors endpoint example: ```bash curl http://localhost:18003/v1/status/errors - { - "checks": { - "endpoints": [ - { - "url": "https://staging-infra-api.newrelic.com/infra/v2/metrics", - "reachable": false, - "error": "endpoint check timeout exceeded" - } - ] - }, - "config": { - "reachability_timeout": "10s" - } - } + [output] { + [output] "checks": { + [output] "endpoints": [ + [output] { + [output] "url": "https://staging-infra-api.newrelic.com/infra/v2/metrics", + [output] "reachable": false, + [output] "error": "endpoint check timeout exceeded" + [output] } + [output] ] + [output] }, + [output] "config": { + [output] "reachability_timeout": "10s" + [output] } + [output] } ``` This is similar to the main status endpoint but filtering those with errors only. @@ -6025,10 +6025,10 @@ If you are having problems with proxy configuration, see [Proxy troubleshooting] ```bash curl http://localhost:8003/v1/status/entity - { - "guid":"MMMMNjI0NjR8SU5GUkF8TkF8ODIwMDg3MDc0ODE0MTUwNTMy", - "key":"your-host-name" - } + [output] { + [output] "guid":"MMMMNjI0NjR8SU5GUkF8TkF8ODIwMDg3MDc0ODE0MTUwNTMy", + [output] "key":"your-host-name" + [output] } ``` Returns information about the agent/host entity. A response status code _204_ ("No Content") will be returned when the agent still has no information From c8c6444d4b76e204ba479d5876104c7fb7dd25fa Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:43:33 -0700 Subject: [PATCH 02/17] fix: code indentation --- ...all-infrastructure-monitoring-agent-macos.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/content/docs/infrastructure/install-infrastructure-agent/macos-installation/install-infrastructure-monitoring-agent-macos.mdx b/src/content/docs/infrastructure/install-infrastructure-agent/macos-installation/install-infrastructure-monitoring-agent-macos.mdx index 9ad2144c555..9ea808f3a8e 100644 --- a/src/content/docs/infrastructure/install-infrastructure-agent/macos-installation/install-infrastructure-monitoring-agent-macos.mdx +++ b/src/content/docs/infrastructure/install-infrastructure-agent/macos-installation/install-infrastructure-monitoring-agent-macos.mdx @@ -34,25 +34,25 @@ To install the infrastructure agent, follow the step-by-step instructions: You can check your Homebrew installation with: ```bash - which brew + which brew ``` If it's not installed, you can install it with this command (or check [Homebrew](https://brew.sh/) up-to-date instructions): ```bash - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` 3. Then, open the terminal and run the following command:: ```bash - brew install newrelic-infra-agent -q + brew install newrelic-infra-agent -q ``` 4. Start the infrastructure agent service: ```bash - brew services start newrelic-infra-agent + brew services start newrelic-infra-agent ``` 5. Create the configuration file and add your : @@ -60,15 +60,15 @@ To install the infrastructure agent, follow the step-by-step instructions: Intel x86: ```bash - sudo mkdir -p /usr/local/etc/newrelic-infra/ - echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /usr/local/etc/newrelic-infra/newrelic-infra.yml + sudo mkdir -p /usr/local/etc/newrelic-infra/ + echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /usr/local/etc/newrelic-infra/newrelic-infra.yml ``` Apple Silicon: ```bash - sudo mkdir -p /opt/homebrew/etc/newrelic-infra/ - echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /opt/homebrew/etc/newrelic-infra/newrelic-infra.yml + sudo mkdir -p /opt/homebrew/etc/newrelic-infra/ + echo "license_key: YOUR_LICENSE_KEY" | sudo tee -a /opt/homebrew/etc/newrelic-infra/newrelic-infra.yml ``` Wait a few minutes, then [view your server in the infrastructure UI](/docs/infrastructure/infrastructure-ui-pages/infra-ui-overview). If no data appears after waiting a few minutes, follow the [troubleshooting steps](/docs/infrastructure/new-relic-infrastructure/troubleshooting/no-data-appears-infrastructure). From 81df0cc82aa7befbcbaaf7f0ae464c5606c3715e Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:48:08 -0700 Subject: [PATCH 03/17] chore: add syntax highlighting --- .../zip-assisted-install-infrastructure-agent-windows.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/infrastructure/install-infrastructure-agent/windows-installation/zip-assisted-install-infrastructure-agent-windows.mdx b/src/content/docs/infrastructure/install-infrastructure-agent/windows-installation/zip-assisted-install-infrastructure-agent-windows.mdx index 489a8f0188b..904f06fe77a 100644 --- a/src/content/docs/infrastructure/install-infrastructure-agent/windows-installation/zip-assisted-install-infrastructure-agent-windows.mdx +++ b/src/content/docs/infrastructure/install-infrastructure-agent/windows-installation/zip-assisted-install-infrastructure-agent-windows.mdx @@ -19,7 +19,7 @@ To install the agent: 1. Download the [packaged agent file](https://download.newrelic.com/infrastructure_agent/binaries/windows/) or use the following command that automatically fetches a specific version of the agent, its checksum and verifies it after download. Replace `$arch=amd64` with desired architecture (amd64, 386) and `$v=1.27.4` with [latest or specific version](https://github.com/newrelic/infrastructure-agent/releases/latest). - ``` + ```sh $v="1.27.4"; $arch="amd64"; $url="https://download.newrelic.com/infrastructure_agent/binaries/windows/$arch/newrelic-infra-$arch.$v.zip";@("$url", "$url.sum") | ForEach-Object { Invoke-WebRequest -Uri $_ -OutFile $_.Split('/')[-1] }; write-host 'Checksum:' $(If (Select-String -Path "$url.sum".Split('/')[-1] -Pattern (Get-FileHash $url.Split('/')[-1]).Hash -Quiet) {"Ok"} Else {"Fail"}) ``` 2. Unpack the file. From b77083fa62fdcbe7655b64845b785a1ed4256722 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:49:28 -0700 Subject: [PATCH 04/17] chore: add language identifier --- .../zip-manual-install-infrastructure-agent-windows.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/infrastructure/install-infrastructure-agent/windows-installation/zip-manual-install-infrastructure-agent-windows.mdx b/src/content/docs/infrastructure/install-infrastructure-agent/windows-installation/zip-manual-install-infrastructure-agent-windows.mdx index b6ee0948ae8..0f738bdc247 100644 --- a/src/content/docs/infrastructure/install-infrastructure-agent/windows-installation/zip-manual-install-infrastructure-agent-windows.mdx +++ b/src/content/docs/infrastructure/install-infrastructure-agent/windows-installation/zip-manual-install-infrastructure-agent-windows.mdx @@ -23,7 +23,7 @@ To install the agent: 1. Download the [packaged agent file](https://download.newrelic.com/infrastructure_agent/binaries/windows/) or use the following command that automatically fetches a specific version of the agent, its checksum and verifies it after download. Replace `$arch=amd64` with desired architecture (amd64, 386) and `$v=1.27.4` with [latest or specific version](https://github.com/newrelic/infrastructure-agent/releases/latest). - ``` + ```sh $v="1.27.4"; $arch="amd64"; $url="https://download.newrelic.com/infrastructure_agent/binaries/windows/$arch/newrelic-infra-$arch.$v.zip";@("$url", "$url.sum") | ForEach-Object { Invoke-WebRequest -Uri $_ -OutFile $_.Split('/')[-1] }; write-host 'Checksum:' $(If (Select-String -Path "$url.sum".Split('/')[-1] -Pattern (Get-FileHash $url.Split('/')[-1]).Hash -Quiet) {"Ok"} Else {"Fail"}) ``` 2. Unpack the file. From a28e5de47fa5dbf9fd8d3784104a551b4eadfcce Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:56:58 -0700 Subject: [PATCH 05/17] chore: add syntax highlighting --- .../update-or-uninstall/update-infrastructure-agent.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/update-infrastructure-agent.mdx b/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/update-infrastructure-agent.mdx index 1f262ac0cd0..cd29b4ae0fa 100644 --- a/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/update-infrastructure-agent.mdx +++ b/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/update-infrastructure-agent.mdx @@ -32,7 +32,7 @@ To view the current infrastructure agent version for a host in the New Relic UI, * Single hosts: See the `agentVersion` tag on any [host entity](/docs/new-relic-solutions/new-relic-one/core-concepts/what-entity-new-relic/#find), or look for its `Agent version` in the **Infrastructure** UI. * Multiple hosts: Go to **Infrastructure > Navigator** and group reporting entities by `agentVersion` to see a list of active hosts per version. * Query: Use the `agentVersion` attribute on any standard agent metric to generate a report. For example, the following NRQL query shows number of unique active hosts group by agent version: - ``` + ```sql FROM SystemSample SELECT uniqueCount(hostname) FACET agentVersion LIMIT MAX From 20063fe03731e27a366af8918d08f4d6acccf3be Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:59:16 -0700 Subject: [PATCH 06/17] chore: add syntax highlighting --- .../uninstall-infrastructure-integrations.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/uninstall-infrastructure-integrations.mdx b/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/uninstall-infrastructure-integrations.mdx index 4dda18222e7..9979f337565 100644 --- a/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/uninstall-infrastructure-integrations.mdx +++ b/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/uninstall-infrastructure-integrations.mdx @@ -140,25 +140,25 @@ Here are some examples: You can check the available contexts with: - ``` + ```sh kubectl config get-contexts ``` And switch to the desired context using: - ``` + ```sh kubectl config use-context CONTEXT_NAME ``` If you used Helm to install the Kubernetes integration, just uninstall it using Helm: - ``` + ```sh helm uninstall --namespace NAMESPACE_USED_DURING_INSTALLATION RELEASE_NAME ``` If you installed Kubernetes integration using a manifest, use the same manifest to uninstall it: - ``` + ```sh kubectl delete -f newrelic-infrastructure.yaml ``` @@ -406,7 +406,7 @@ If you remove the integrations package and want to continue using the related on - ``` + ```sh sudo zypper -n remove newrelic-infra-integrations --clean-deps ``` From 8c3ef26a07a580088ead80e3758e923de9f7f2b5 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:00:26 -0700 Subject: [PATCH 07/17] chore: add syntax highlighting --- .../uninstall-infrastructure-agent.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/uninstall-infrastructure-agent.mdx b/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/uninstall-infrastructure-agent.mdx index bf16736141f..58d052687a1 100644 --- a/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/uninstall-infrastructure-agent.mdx +++ b/src/content/docs/infrastructure/install-infrastructure-agent/update-or-uninstall/uninstall-infrastructure-agent.mdx @@ -34,7 +34,7 @@ If you used the default install procedure for your infrastructure agent for Linu > Execute the following command as root: - ``` + ```sh sudo apt-get remove newrelic-infra ``` @@ -45,7 +45,7 @@ If you used the default install procedure for your infrastructure agent for Linu > Execute the following command as root: - ``` + ```sh sudo yum remove newrelic-infra ``` @@ -56,7 +56,7 @@ If you used the default install procedure for your infrastructure agent for Linu > Execute the following command as root: - ``` + ```sh sudo zypper -n remove newrelic-infra ``` @@ -84,13 +84,13 @@ If you followed an [assisted](/docs/infrastructure/install-configure-infrastruct If you used the default install procedure for the infrastructure agent for macOS environments, to uninstall: 1. [Stop the infrastructure agent](/docs/infrastructure/new-relic-infrastructure/configuration/start-stop-restart-check-infrastructure-agent-status#macOS): - ``` - brew services stop newrelic-infra-agent + ```sh + brew services stop newrelic-infra-agent ``` 2. From the terminal, run the uninstall command: - ``` - brew uninstall newrelic-infra-agent + ```sh + brew uninstall newrelic-infra-agent ``` ## Uninstall using config management tools [#uninstall-other] From f3571e324398ff1543138049006dd2afd8a89921 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:06:20 -0700 Subject: [PATCH 08/17] chore: add syntax highlighting --- .../no-data-appears-infrastructure.mdx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-infrastructure/no-data-appears-infrastructure.mdx b/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-infrastructure/no-data-appears-infrastructure.mdx index b1215bac3f9..34b1b1517e5 100644 --- a/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-infrastructure/no-data-appears-infrastructure.mdx +++ b/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-infrastructure/no-data-appears-infrastructure.mdx @@ -46,7 +46,7 @@ If no data appears in the UI, try the following steps to diagnose the problem: > 1. Use `dpkg` to verify that the agent is installed: - ``` + ```sh dpkg -l | grep newrelic-infra ``` 2. If `dpkg` returns no output, see [Install with apt](/docs/infrastructure/new-relic-infrastructure/installation/install-infrastructure-linux#apt-based). @@ -58,7 +58,7 @@ If no data appears in the UI, try the following steps to diagnose the problem: > 1. Use `rpm` to verify that agent is installed: - ``` + ```sh rpm -qa | grep newrelic-infra ``` 2. If `rpm` returns no output, see [Install with yum](/docs/infrastructure/new-relic-infrastructure/installation/install-infrastructure-linux#yum-based). @@ -70,7 +70,7 @@ If no data appears in the UI, try the following steps to diagnose the problem: > 1. Use the Windows command prompt or Powershell to verify that the [agent directory](/docs/agents/manage-apm-agents/troubleshooting/find-agent-root-directory#infra-agent) exists: - ``` + ```sh dir "C:\Program Files\New Relic\newrelic-infra" ``` 2. If you receive a `File not found` error, see [Install for Windows Server](/docs/infrastructure/new-relic-infrastructure/installation/install-infrastructure-windows-server). @@ -87,12 +87,12 @@ If no data appears in the UI, try the following steps to diagnose the problem: 1. Check that the agent is running: - ``` + ```sh sudo systemctl status newrelic-infra ``` 2. If the agent isn't running, start the agent manually: - ``` + ```sh sudo systemctl start newrelic-infra ``` @@ -105,12 +105,12 @@ If no data appears in the UI, try the following steps to diagnose the problem: 1. Check that the agent is running: - ``` + ```sh sudo /etc/init.d/newrelic-infra status ``` 2. If the agent isn't running, start the agent manually: - ``` + ```sh sudo /etc/init.d/newrelic-infra start ``` @@ -123,12 +123,12 @@ If no data appears in the UI, try the following steps to diagnose the problem: 1. Check that the agent is running: - ``` + ```sh sudo initctl status newrelic-infra ``` 2. If the agent isn't running, start the agent manually: - ``` + ```sh sudo initctl start newrelic-infra ``` @@ -141,13 +141,13 @@ If no data appears in the UI, try the following steps to diagnose the problem: 1. Check that the agent is running: - ``` + ```sh sc query "newrelic-infra" | find "RUNNING" ``` 2. If the agent isn't running, start the agent manually with the Windows command prompt: - ``` + ```sh net start newrelic-infra ``` @@ -166,7 +166,7 @@ If no data appears in the UI, try the following steps to diagnose the problem: 6. Verify that no firewalls or proxies are blocking outbound connections from the agent process to the [Infrastructure domains and ports](/docs/apm/new-relic-apm/getting-started/networks#infrastructure). 7. Confirm the host is reporting correctly even though it is not appearing in the infrastructure monitoring UI by creating a basic query in Query builder, like: - ``` + ```sql SELECT * FROM SystemSample SINCE 60 minutes ago LIMIT 100 ``` From 0423bb6a0509f1de60f7c9116d959dd70a21bee9 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:08:13 -0700 Subject: [PATCH 09/17] chore: add syntax highlighting --- .../reduce-infrastructure-agents-cpu-footprint.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/reduce-infrastructure-agents-cpu-footprint.mdx b/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/reduce-infrastructure-agents-cpu-footprint.mdx index c911e98e2b1..9944ded9282 100644 --- a/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/reduce-infrastructure-agents-cpu-footprint.mdx +++ b/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/reduce-infrastructure-agents-cpu-footprint.mdx @@ -125,7 +125,7 @@ The infrastructure agent has built-in plugins that collect inventory data (speci * **Disable all plugins:** `disable_all_plugins: true` * **Enable selected plugins:** To enable certain plugins, insert an exception in `disable_all_plugins`. For example, the following configuration disables all plugins, and reenables the Network Interfaces and SELinus plugins to report every 120 seconds: - ``` + ```yml disable_all_plugins: true network_interface_interval_sec: 120 selinux_interval_sec: 120 @@ -153,13 +153,13 @@ The infrastructure agent has built-in plugins that collect inventory data (speci For example, to execute the plugin once every 10 minutes: - ``` + ```yml sysctl_interval_sec: 600 ``` To disable the Sysctl plugin: - ``` + ```yml sysctl_interval_sec: -1 ``` From 192c02d5ae7a8d75c724d649458b89101f308e67 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:10:33 -0700 Subject: [PATCH 10/17] chore: +syntax highlighting --- .../troubleshooting/time-gaps-missing-data.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/time-gaps-missing-data.mdx b/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/time-gaps-missing-data.mdx index b757a9795dd..56d75aec2c2 100644 --- a/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/time-gaps-missing-data.mdx +++ b/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/time-gaps-missing-data.mdx @@ -26,10 +26,10 @@ The following steps mitigate the data gaps problem: id="apt-install-verify" title="Edit the newrelic-infra.yml configuration file (Windows)" > - 1. Open the following file in your favorite plain text editor: C:\\Program Files\\New Relic\\newrelic-infra\\newrelic-infra.yml + 1. Open the following file in your favorite plain text editor: `C:\Program Files\New Relic\newrelic-infra\newrelic-infra.yml` 2. Add the following configuration option: - ``` + ```yml max_procs: -1 ``` @@ -38,10 +38,10 @@ The following steps mitigate the data gaps problem: id="apt-install-verify" title="Edit the newrelic-infra.yml configuration file (Linux)" > - 1. Open the following file in your favorite plain text editor: /etc/newrelic-infra.yml + 1. Open the following file in your favorite plain text editor: `/etc/newrelic-infra.yml` 2. Add the following configuration option: - ``` + ```yml max_procs: -1 ``` @@ -55,7 +55,7 @@ The following steps mitigate the data gaps problem: > Use SystemD commands with CentOS 7, Debian 8, RHEL 7, and Ubuntu 15.04 or higher: - ``` + ```sh sudo systemctl restart newrelic-infra ``` @@ -66,7 +66,7 @@ The following steps mitigate the data gaps problem: > Use System V commands with Debian 7: - ``` + ```sh sudo /etc/init.d/newrelic-infra restart ``` @@ -77,7 +77,7 @@ The following steps mitigate the data gaps problem: > Use Upstart commands with Amazon Linux, CentOS 6, RHEL 6, and Ubuntu 14.10 or lower: - ``` + ```sh sudo initctl restart newrelic-infra ``` @@ -86,7 +86,7 @@ The following steps mitigate the data gaps problem: id="windows-verify-status" title="Restart the agent in Windows" > - ``` + ```sh net stop newrelic-infra net start newrelic-infra ``` From be9129ce3125e389602a737e0c01745fbf06b737 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:12:21 -0700 Subject: [PATCH 11/17] chore: +syntax highlighting --- .../incorrect-data-reported.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/incorrect-data-reported.mdx b/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/incorrect-data-reported.mdx index c4265f4f329..ca0efddbb23 100644 --- a/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/incorrect-data-reported.mdx +++ b/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/incorrect-data-reported.mdx @@ -22,20 +22,20 @@ This setting generates a lot of data very quickly, we recommend only enabling it 1. Edit the [newrelic-infra.yml](/docs/infrastructure/install-infrastructure-agent/configuration/infrastructure-agent-configuration-settings/#logging-variables) configuration file and add required flags to enable logs. For example, to enable all trace logs on the default log file path: - ``` - log: - level: trace + ```yml + log: + level: trace ``` Infrastructure agent version 1.26.0 or older require a different logging configuration: -``` - verbose: 1 - trace: - # v3.submission enables detailed logging for events, examples: SystemSample, NetworkSample, etc. - - v3.submission - # dm.submission enables detailed logging for integrations using Dimensional Metric format. - - dm.submission +```yml +verbose: 1 +trace: + # v3.submission enables detailed logging for events, examples: SystemSample, NetworkSample, etc. + - v3.submission + # dm.submission enables detailed logging for integrations using Dimensional Metric format. + - dm.submission ``` 2. Use [your init system](/docs/infrastructure/new-relic-infrastructure/configuration/start-stop-restart-check-infrastructure-agent-status#init-system) to restart the agent service: @@ -47,7 +47,7 @@ Infrastructure agent version 1.26.0 or older require a different logging configu > Use SystemD commands with CentOS 7, Debian 8, RHEL 7, and Ubuntu 15.04 or higher: - ``` + ```sh sudo systemctl restart newrelic-infra ``` @@ -58,7 +58,7 @@ Infrastructure agent version 1.26.0 or older require a different logging configu > Use System V commands with Debian 7: - ``` + ```sh sudo /etc/init.d/newrelic-infra restart ``` @@ -69,7 +69,7 @@ Infrastructure agent version 1.26.0 or older require a different logging configu > Use Upstart commands with Amazon Linux, CentOS 6, RHEL 6, and Ubuntu 14.10, or lower: - ``` + ```sh sudo initctl restart newrelic-infra ``` @@ -78,7 +78,7 @@ Infrastructure agent version 1.26.0 or older require a different logging configu id="windows-verify-status" title="Restart the agent in Windows" > - ``` + ```sh net stop newrelic-infra net start newrelic-infra ``` @@ -89,7 +89,7 @@ Infrastructure agent version 1.26.0 or older require a different logging configu Log example when v3.submission is enabled: -``` +```log time="2021-12-28T09:27:28Z" level=debug msg="Sending events to metrics-ingest." component=MetricsIngestSender key=... numEvents=3 postCount=1 timestamps="[2021-01-01 09:27:28 +0000 UTC]" time="2021-12-28T09:27:28Z" level=debug msg="Preparing metrics post." component=MetricsIngestSender postCount=1 time="2021-12-28T09:27:28Z" level=trace msg="[{\"EntityID\":111,\"IsAgent\":true,\"Events\":[{\"eventType\":\"SystemSample\",\"timestamp\":1640683648,\"entityKey\":\"...\",\"cpuPercent\":0.2004008016032026, ...}]" feature=v3.submission From 3ddd46189b5607165fbffaeb3e64492a3fe74f08 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:20:33 -0700 Subject: [PATCH 12/17] chore: add syntax highlighting --- .../infrastructure-agent-logging-behavior.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-logs/infrastructure-agent-logging-behavior.mdx b/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-logs/infrastructure-agent-logging-behavior.mdx index a77527fda07..469a7d1f60f 100644 --- a/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-logs/infrastructure-agent-logging-behavior.mdx +++ b/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-logs/infrastructure-agent-logging-behavior.mdx @@ -16,7 +16,7 @@ New Relic's infrastructure agent gathers its own data as well as integrations's The following example shows a typical configuration for the agent log in Linux systems (change file path when running Windows or other platforms): -``` +```yml log: level: info file: '/var/log/newrelic-infra/newrelic-infra.log' @@ -60,7 +60,7 @@ By default, Infrastructure logs are formatted as text: Alternatively, logs can be formatted as a JSON file: -``` +```json {"context":{},"level":"info","msg":"upstart_interval_sec: 0","timestamp":"2019-07-11T18:24:03+02:00"} {"context":{},"level":"info","msg":"plugin_dir: ","timestamp":"2019-07-11T18:24:03+02:00"} ``` @@ -81,18 +81,18 @@ For more information on how to enable smart verbose mode and the debug message l ## Integration log management -Integrations write JSON payloads into STDOUT and plain-text (JSON structured in the future) logs into STDERR. +Integrations write JSON payloads into `STDOUT` and plain-text (JSON structured in the future) logs into `STDERR`. -The infrastructure agent handles integration STDERR lines and forward this output into the agent log. +The infrastructure agent handles integration `STDERR` lines and forward this output into the agent log. -Agent handles each STDERR line as follows: +Agent handles each `STDERR` line as follows: -* **when agent runs in verbose mode**: it just forwards the full STDERR line as a DEBUG agent log entry placing integration line contexts within the \`msg\` field. -* **otherwise**: it parses the line against the expected format (see below) and only logs as agent ERROR level, entries produced by integrations with \`fatal\` or \`error\` severity levels. In this case fields are extracted and forwarded in structured manner (therefore if JSON output is enabled for the agent fields become queryable. +* **When agent runs in verbose mode**: it just forwards the full `STDERR` line as a DEBUG agent log entry placing integration line contexts within the `msg` field. +* **Otherwise**: it parses the line against the expected format (see below) and only logs as agent ERROR level, entries produced by integrations with `fatal` or `error` severity levels. In this case fields are extracted and forwarded in structured manner (therefore if JSON output is enabled for the agent fields become queryable. By default, the infrastructure agent filters out any errors from integrations that don't prevent the integration from running. You'll only see all errors from an integration if the log level is set to DEBUG, or if the integration is specifically listed in the log configuration. For example, in this configuration, all errors coming from `nri-mssql` will be shown, even if the log level is INFO: -```YAML +```yml log: include_filters: integration_name: @@ -109,7 +109,7 @@ A line is expected to be a list of key-value pairs separated by an equal charact Internally agent used this regex to extract the fields: -``` +```regex ([^\s]*?)=(".*?[^\\]"|&{.*?}|[^\s]*) ``` From 901a84d9b17f896d953cd04f7953f1aae7679b11 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:21:48 -0700 Subject: [PATCH 13/17] chore: syntax highlighting --- .../generate-logs-troubleshooting-infrastructure.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-logs/generate-logs-troubleshooting-infrastructure.mdx b/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-logs/generate-logs-troubleshooting-infrastructure.mdx index 4f00d2aa2ce..92adaaa860a 100644 --- a/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-logs/generate-logs-troubleshooting-infrastructure.mdx +++ b/src/content/docs/infrastructure/infrastructure-troubleshooting/troubleshoot-logs/generate-logs-troubleshooting-infrastructure.mdx @@ -52,7 +52,7 @@ Generating `debug` log files requires editing your configuration file. For a sam Edit your `newrelic-infra.yml` file with logging settings: - ``` + ```yml log: level: debug file: /path/to/logfile.log @@ -138,7 +138,7 @@ These are some additional notes and requirements for specific systems, used to s * Recommended: Set the environment variable `NRIA_LOG_LEVEL` to `debug`. Running this on the command line would look like: - ``` + ```sh -e NRIA_LOG_LEVEL=debug ``` @@ -146,7 +146,7 @@ These are some additional notes and requirements for specific systems, used to s * Edit the config file to set `level: debug` in the `log` section. (Editing the config file in a container is not recommended, because it requires rebuilding the image twice: once to add verbose logging and once to remove it.) 2. Use `journalctl` to collect the logs: - ``` + ```sh journalctl -u newrelic-infra > newrelic-infra.log ``` 3. Set the logging level back to `info` or `warn` after collecting logs for a few minutes. From 4bd4809b8c654d294f491a06bcd1480e5392d934 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:22:30 -0700 Subject: [PATCH 14/17] chore: syntax highlighting --- .../troubleshooting/agent-not-starting-there-are-no-logs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/agent-not-starting-there-are-no-logs.mdx b/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/agent-not-starting-there-are-no-logs.mdx index 130f87af055..90d2a9b0a0e 100644 --- a/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/agent-not-starting-there-are-no-logs.mdx +++ b/src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/agent-not-starting-there-are-no-logs.mdx @@ -39,6 +39,6 @@ To solve this, try one of these options: * Change the owner of the log file. * Change the `log_file` entry in the `/etc/newrelic-infra.yml` configuration file. Our installation scripts create the `/var/log/newrelic-infra/` folder for that purpose, so we recommend the following value: - ``` + ```yml log_file: /var/log/newrelic-infra/newrelic-infra.log ``` From d78388d52f3a502bd2f977bda37f51bbb2b218b0 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:25:12 -0700 Subject: [PATCH 15/17] chore: syntax highlighting --- src/content/docs/logs/get-started/live-archives.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/logs/get-started/live-archives.mdx b/src/content/docs/logs/get-started/live-archives.mdx index e8b783ab10d..1f50fcd7800 100644 --- a/src/content/docs/logs/get-started/live-archives.mdx +++ b/src/content/docs/logs/get-started/live-archives.mdx @@ -145,13 +145,13 @@ The live archives feature offers long-term log data storage that you intend to q Here is an example query: - ``` + ```graphql query { actor { account(id: 1234567) { nrql( query: "SELECT count(*) FROM Log SINCE '2024-02-01 12:00:00' UNTIL '2024-02-01 13:00:00'" - options: {eventNamespaces: "Logging:Archive"} + options: { eventNamespaces: "Logging:Archive" } async: true ) { results From 3756db004bc830dd78e2a9a45fa1f0f82af986b2 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:26:35 -0700 Subject: [PATCH 16/17] chore: indentation fix --- .../logs/forward-logs/enable-log-management-new-relic.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/logs/forward-logs/enable-log-management-new-relic.mdx b/src/content/docs/logs/forward-logs/enable-log-management-new-relic.mdx index 32c474a00ea..84f25e60f0e 100644 --- a/src/content/docs/logs/forward-logs/enable-log-management-new-relic.mdx +++ b/src/content/docs/logs/forward-logs/enable-log-management-new-relic.mdx @@ -86,8 +86,8 @@ Here are some details on how to accomplish specific use cases: * Use our infrastructure agent to collect host-level logs. In the `logging.yml` config file be sure to tail the `/var/log/containers/*.log` directory. For example: ```yml logs: - - name: Docker-logs - file: /var/log/containers/*.log # Path to Docker log files + - name: Docker-logs + file: /var/log/containers/*.log # Path to Docker log files ``` * Use our [Standalone Docker image](https://hub.docker.com/r/newrelic/newrelic-fluentbit-output) From c1abe2394f49299f40275a2a5dcfb6e0c749ef29 Mon Sep 17 00:00:00 2001 From: Brian Hensley <48165493+brnhensley@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:31:24 -0700 Subject: [PATCH 17/17] chore: code formatting --- .../forward-logs/kubernetes-plugin-log-forwarding.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/content/docs/logs/forward-logs/kubernetes-plugin-log-forwarding.mdx b/src/content/docs/logs/forward-logs/kubernetes-plugin-log-forwarding.mdx index b4ed4c36d9e..99a90ef0134 100644 --- a/src/content/docs/logs/forward-logs/kubernetes-plugin-log-forwarding.mdx +++ b/src/content/docs/logs/forward-logs/kubernetes-plugin-log-forwarding.mdx @@ -41,9 +41,9 @@ To forward your Kubernetes logs to New Relic with our plugin: If you're [using a Kubernetes secret](https://github.com/newrelic/helm-charts/blob/master/charts/newrelic-logging/values.yaml#L8-L25) to store the New Relic , the `newrelic-logging` chart defaults to sending logs to the US API endpoint. If the license key belongs to an EU or FedRAMP account, and a secret is used for key storage, you must update the endpoint setting with the appropriate value from the [API reference docs](/docs/logs/log-api/introduction-log-api/#endpoint). Here's an example of how to set this for EU accounts: ```yml - newrelic-logging: - enabled: true - endpoint: https://log-api.eu.newrelic.com/log/v1 + newrelic-logging: + enabled: true + endpoint: https://log-api.eu.newrelic.com/log/v1 ``` @@ -80,8 +80,8 @@ To configure your Kubernetes cluster to send the log forwarder internal metrics ```yml newrelic-logging: - fluentBit: - sendMetrics: true + fluentBit: + sendMetrics: true ``` You only need to enable the `newrelic-logging.fluentBit.sendMetrics` setting when troubleshooting a Kubernetes cluster. We recommend enabling it for a single Kubernetes cluster at a time to ease troubleshooting.