Skip to content

Commit 7cc9089

Browse files
authored
Merge pull request #21639 from newrelic/feature/NR-441141-review-docs
Feature/nr 441141 review docs
2 parents 3541969 + 61bd132 commit 7cc9089

File tree

12 files changed

+558
-142
lines changed

12 files changed

+558
-142
lines changed

src/content/docs/infrastructure-as-code/terraform/agent-control.mdx

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,36 @@ title: "Agent Control setup with Terraform"
33
metaDescription: "Agent Control is an agent supervisor that can be used to deploy, update, and manage New Relic agents."
44
freshnessValidatedDate: never
55
---
6-
[New Relic Agent Control](/docs/new-relic-control/agent-control/overview) with Terraform makes the large-scale monitoring with New Relic even easier, especially when dealing with multiple Kubernetes clusters. With Terraform and Helm, you can set up New Relic Agent Control in a specified, repeatable, and scalable way across your entire Kubernetes infrastructure.
6+
[New Relic Agent Control](/docs/new-relic-control/agent-control/overview) with Terraform provides a powerful, declarative solution for managing fleets of agents at scale. By using Terraform and Helm together, you can ensure a consistent, repeatable, and scalable approach to deploying New Relic instrumentation across your entire infrastructure, especially when dealing with multiple Kubernetes clusters.
77

88
## Prerequisites [#prereqs]
9-
Before using this integration in Terraform, ensure you have the following:
10-
11-
- **Helm 3:** Helm version 3 must be installed on your machine. For installation instructions, see [Installing Helm](https://helm.sh/docs/intro/install).
12-
- **New Relic license key:** You'll need a New Relic license key to report telemetry to your New Relic account.
13-
- **New Relic user key:** You'll need your [New Relic user key](/docs/apis/intro-apis/new-relic-api-keys/) if you haven't already pulled your `clientID` key and secret.
14-
- **User permissions:** Your New Relic user has the auth domain manager and org product admin roles.
15-
- **New Relic OrgId:** The New Relic `OrgId` will identify which organization you are getting your client ID key and secret from.
16-
- **Kubernetes cluster name:** Have the name of your Kubernetes cluster ready, as it will be referenced during the installation process.
9+
Before you begin, ensure you have the following:
10+
11+
- **Required Tools:**
12+
- **[Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)** installed on your machine.
13+
- **Helm 3** installed on your machine. For installation instructions, see [Installing Helm](https://helm.sh/docs/intro/install).
14+
- **[Terraform Helm Provider](https://registry.terraform.io/providers/hashicorp/helm/latest/docs)** included in your Terraform configuration script for the installation to work.
15+
16+
- **New Relic Credentials:**
17+
- **New Relic license key:** You'll need a New Relic license key to report telemetry to your New Relic account.
18+
- **New Relic user key:** You'll need your [New Relic user key](/docs/apis/intro-apis/new-relic-api-keys/) if you haven't already pulled your `clientID` key and secret.
19+
20+
- **Configuration Details:**
21+
- **New Relic Organization ID:** The New Relic `OrgId` will identify which organization you are getting your client ID key and secret from.
22+
- **User permissions:** Your user needs the correct permissions to create a System Identity. This typically requires the Authentication Domain Manager and Org Product Admin roles.
23+
- **Kubernetes cluster name:** Have the name of your Kubernetes cluster ready, as it will be referenced during the installation process.
24+
1725
<Callout variant="tip">
1826
When setting up a new cluster with Terraform, make sure to use the same cluster name during the installation of agent control.
1927
</Callout>
20-
- **Helm provider for Terraform:** Include the [Helm provider](https://registry.terraform.io/providers/hashicorp/helm/latest/docs) in your Terraform script for the installation to work.
21-
- **Terraform:** Make sure you have [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) installed on your machine.
2228

23-
## Compatibility [#compatibility]
29+
### Kubernetes Compatibility [#compatibility]
2430

2531
To find out which Kubernetes versions are compatible with this solution, refer to the [compatibility](/docs/new-relic-control/agent-control/overview/#compatibility) section in the overview.
2632

2733
## Install [#installation]
2834

29-
If you don't have your `clientId` and `clientSecret`, fetch them using the following [NerdGraph](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/) API:
35+
If you don't have your `clientId` and `clientSecret`, use the following [NerdGraph](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/) API call to generate them. This requires your New Relic Admin User Key and Organization ID.
3036

3137
```sh
3238
curl -X POST \
@@ -39,13 +45,13 @@ If you don't have your `clientId` and `clientSecret`, fetch them using the follo
3945

4046
In the command, replace the placeholder values with your `organizationId` and user key. This returns the required credentials that you'll use in your configuration file.
4147

42-
### Step 1
48+
### Step 1: Create Your Project Directory
4349

44-
Create a directory for your project and place your `main.tf` file inside it. Confirm that you have added the [Helm provider](https://registry.terraform.io/providers/hashicorp/helm/latest/docs) to your Terraform file.
50+
Create a directory for your project and place your `main.tf` file inside it. This is where you'll define your Terraform resources. Confirm that you have added the [Helm provider](https://registry.terraform.io/providers/hashicorp/helm/latest/docs) to your Terraform file.
4551

46-
### Step 2
52+
### Step 2: Configure Terraform with the Helm Release
4753

48-
Configure your Terraform script with a Helm release that uses New Relic's charts for Agent Control. See the sample script below:
54+
Configure your Terraform script with a Helm release that uses New Relic's charts for Agent Control. The following example shows a basic configuration:
4955

5056
```hcl
5157
provider "helm" {
@@ -101,37 +107,45 @@ agent-control-deployment:
101107
To explore all available configuration settings, refer to [`values-newrelic.yaml`](https://github.com/newrelic/helm-charts/blob/master/charts/agent-control/values.yaml).
102108

103109

104-
### Step 3
110+
### Step 3: Run Terraform Commands
105111

106-
Initialize and review the Terraform script:
112+
Initialize Terraform, review the plan, and apply the changes.
107113

108114
```shell
115+
# Initialize Terraform
109116
terraform init
110117
```
111118

112119
```shell
120+
# Review the changes before applying
113121
terraform plan
114122
```
115123

116-
### Step 4
117-
118-
Apply your changes:
119-
120124
```shell
125+
# Apply the changes to your cluster
121126
terraform apply
122127
```
123128

124-
### Step 5
129+
### Step 5: Verify the Installation
125130

126-
Check to make sure the agent pods get built out correctly using Kube Control:
131+
Check to make sure the Agent Control pods and any configured agents are running correctly in their respective namespaces.
127132

128133
```shell
134+
# Check Agent Control pods
129135
kubectl get pods -n newrelic
130136
```
137+
```shell
138+
# Check pods in the agent namespace, e.g., 'newrelic-agents'
139+
kubectl get pods -n newrelic-agents
140+
```
131141

132142
## Configuration [#configuration]
133143

134-
In `values-newrelic.yaml`, you can configure the installation of multiple monitoring agents. This example shows the options available, including New Relic's infrastructure agent, Fluent Bit logs agent, OpenTelemetry collector agent, and [New Relic Pipeline Control](/docs/new-relic-control/pipeline-control/overview) gateway agent:
144+
In the `values-newrelic.yaml` file, you can configure you can configure Agent Control to deploy multiple monitoring agents. Here's an example showing the deployment of several agents, including:
145+
- **Infrastructure:** New Relic's infrastructure agent
146+
- **Logs:** Fluent Bit logs agent
147+
- **OpenTelemetry:** The New Relic distribution of the OpenTelemetry Collector
148+
- **Gateway:** [New Relic Pipeline Control](/docs/new-relic-control/pipeline-control/overview) gateway agent
135149

136150
```yaml
137151
agent-control-deployment:
@@ -179,16 +193,23 @@ agent-control-deployment:
179193
maxReplicas: 10
180194
targetCPUUtilizationPercentage: 70
181195
```
196+
<Callout variant="important">
197+
**Important:** For production environments, we strongly recommend using a specific, pinned `chart_version` instead of a wildcard (`*`). This ensures consistent and predictable updates, preventing unexpected behavior or breaking changes.
198+
</Callout>
182199

183200
## Uninstall [#uninstall]
184201

185202
<Callout variant="important">
186-
Removing a Helm release resource from your Terraform configuration is a destructive action. After you run `terraform apply` following this change, Terraform will uninstall and destroy the related resources in your Kubernetes cluster. This can result in the loss of data and configurations tied to the resources managed by that Helm release. Before proceeding, make sure you fully understand the potential impact on your environment:
203+
Removing a Helm release resource from your Terraform configuration is a **destructive action**. When you run `terraform apply` after this change, Terraform will uninstall the chart and destroy **all** the related resources, potentially leading to data loss. Before proceeding, make sure you fully understand the potential impact on your environment:
187204
- Review all dependencies and services that might be affected.
188205
- Consider backing up any persistent data or configurations linked to the release.
189206
- Confirm that removing this release is necessary and fits your infrastructure management strategy.
190207
Always exercise caution when making significant changes to your infrastructure, and ensure you have proper rollback procedures in place in case something goes wrong.
191208
</Callout>
192209

193-
- Run `terraform plan`: After removing the Helm release resource block from your configuration, run the `terraform plan` command. This allows you to review the changes Terraform plans to make to your infrastructure. Carefully examine the plan output to ensure that only the intended resources are marked for deletion. This step is essential to verify that no unintended deletions or changes will occur.
194-
- Run `terraform apply`: If the terraform plan results align with your expectations, proceed by running the `terraform apply` command. This will implement the planned changes, effectively removing the specified Helm release from your environment. Confirm the execution when prompted to complete the uninstallation process.
210+
### To uninstall Agent Control:
211+
1. **Remove the `helm_release` resource block** for `newrelic_agent_control` from your `main.tf` file.
212+
2. **Run `terraform plan`** to review the changes. Carefully examine the plan output to ensure that only the intended resources are marked for deletion.
213+
3. **Run `terraform apply`** and confirm the execution to uninstall the release. This will implement the planned changes, effectively removing the specified Helm release from your environment.
214+
215+
Confirm the execution when prompted to complete the uninstallation process.

src/content/docs/logs/log-collectors/log-collector-management.mdx

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ This solution is useful for DevOps teams, system administrators, and IT operatio
2323

2424
- **Troubleshooting:** You can troubleshoot and fix configuration issues with your log collectors using the Fluent Bit entity UI, which helps identify and resolve problems.
2525

26-
- **Configuration and remote deployment:** With New Relic Control, you can centrally manage Fluent Bit configurations, update them, and deploy changes remotely.
27-
26+
- **Centralized configuration and remote deployment:** With **New Relic Control**, you can centrally manage Fluent Bit configurations, update them, and deploy changes across your entire fleet remotely. This is the core benefit of the **Agent Control** solution.
2827
<img
2928
title="Fluent Bit entity dashboard"
3029
alt="Fluent Bit entity dashboard"
3130
src="/images/fluent-bit-dashboard.webp"
3231
/>
3332

33+
<Callout variant="tip">
34+
While Agent Control solution is designed to support both containerized and on-premise environments, **Agent Control is currently supporting Kubernetes environments**.
35+
</Callout>
36+
3437
## Manage your Fluent Bit collector for Kubernetes clusters
3538
The log collector lifecycle management solution currently provides support for Kubernetes environments. It enables you to:
3639

@@ -47,22 +50,19 @@ Before you install and configure Fluent Bit for logging with New Relic, ensure y
4750

4851
<Callout variant="important">
4952
You can also manage Fluent Bit via New Relic Control. For information, see [Fleet Control](/docs/new-relic-control/fleet-control/overview).
53+
Agent Control currently only supports **Kubernetes**.
5054
</Callout>
5155

5256
For more information on these requirements, refer to [Forward your logs to New Relic](/docs/logs/forward-logs/enable-log-management-new-relic).<br/>
5357
For information on New Relic Control setup, see [Getting started with New Relic Control](/docs/new-relic-control/getting-started).
5458

5559
### Set up
56-
To install the Fluent Bit agent in Kubernetes clusters:
57-
- Install the [New Relic Kubernetes integration](/install/kubernetes/). This integration includes the Kubernetes plugin for logs.
58-
- Use the configuration options available in the [newrelic-logging repository](https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-logging#configuration) during the [guided install](/install/kubernetes/).
60+
You have two primary options for setting up Fluent Bit in your Kubernetes clusters. We recommend using New Relic Control for centralized, fleet-wide management.
5961

60-
For details, refer to [Enable Kubernetes for log management](/docs/logs/forward-logs/kubernetes-plugin-log-forwarding/#enable-process).
62+
#### Option 1 (Recommended): Install Fluent Bit with New Relic Control
6163

62-
## Install Fluent Bit with Fleet Control
63-
If you're starting with Fleet Control, you'll set up your agent control configuration first. This process includes installing the Fluent Bit agent and other essential components.
64-
65-
To use Fluent Bit with Agent Control, enable log forwarding as part of the Agent Control installation, as shown in the sample configuration:
64+
For an installation that's fully managed by Agent Control, enable log forwarding as part of your New Relic Control guided installation. This process installs the Fluent Bit agent and other essential components and registers the agent with your fleet.
65+
To use Fluent Bit with Agent Control, enable log forwarding as part of the Agent Control installation, as shown in the sample configuration below.
6666

6767
<CollapserGroup>
6868
<Collapser
@@ -122,6 +122,13 @@ Remember to uncomment the necessary configurations and replace placeholders such
122122
Specify an explicit chart version to ensure consistency and reliability across deployments.
123123
</Callout>
124124

125+
#### Option 2: Install with the Kubernetes integration
126+
127+
If you prefer to install Fluent Bit without using Agent Control, follow these steps:
128+
129+
- Install the [New Relic Kubernetes integration](/install/kubernetes/). This integration includes the Kubernetes plugin for logs.
130+
- Use the configuration options available in the [newrelic-logging repository](https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-logging#configuration) during the [guided install](/install/kubernetes/).
131+
125132

126133
## Manage and deploy configuration via Fleet Control
127134
To add a new or edit an existing Fluent Bit configuration, use [Fleet Control](/docs/new-relic-control/fleet-control/overview). The high-level tasks to manage and deploy a configuration are:
@@ -165,7 +172,12 @@ Effective performance monitoring of the Fluent Bit agent is crucial for log mana
165172
- **Memory buffer utilization:** Helps identify resource constraints affecting log processing. It includes buffer usage, instances of overflows, queue length, and overall process and container memory utilization.
166173
- **Container events and crash loop backoffs:** Alerts to abnormal conditions or failures in log pods, including errors, dropped records, and retries. These insights help in identifying and addressing issues that may disrupt log processing.
167174

168-
You can monitor the health and performance of your Fluent Bit agent on the Fluent Bit entity dashboard. Here’s how you can access it:
175+
You can monitor the health and performance of your Fluent Bit agent on the Fluent Bit entity dashboard. For agents managed by New Relic Control, we recommend using the following method.
176+
177+
#### Via Fleet (Recommended for managed agents)
178+
1. In New Relic Control, open **Fleets**.
179+
2. Identify and select the fleet that has the Fluent Bit instrumentation.
180+
3. On the Agents tab, select the Fluent Bit agent.
169181

170182
#### Via Integrations & Agents
171183
1. Open the **Installed** tab. You’ll see the list of agents and integrations currently installed.
@@ -176,11 +188,6 @@ You can monitor the health and performance of your Fluent Bit agent on the Fluen
176188
1. Find the agent that you want to monitor under the Fluent Bit - Kubernetes group.
177189
2. Select the agent.
178190

179-
### Via Fleet
180-
1. In New Relic Control, open **Fleets**.
181-
2. Identify and select the fleet that has the Fluent Bit instrumentation.
182-
3. On the Agents tab, select the Fluent Bit agent.
183-
184191
## Example Use case: Log flow efficiency
185192
Imagine that the logs in your Kubernetes cluster are not arriving at New Relic at the usual rate. Your typical log flow might be around 150,000 logs per minute, but current observations suggest a noticeable drop. Here’s how you can address this situation, leveraging New Relic Control and Fluent Bit monitoring tools to diagnose and resolve the issue.
186193

0 commit comments

Comments
 (0)