Skip to content

Commit c35c665

Browse files
committed
feat(nginx): Add NGINX OTel docs
1 parent a18f520 commit c35c665

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1210
-2579
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
agentName: nginx-otel-host
2+
agentType: integration
3+
title: 'Monitor self-hosted NGINX with OpenTelemetry'
4+
metaDescription: 'Send your NGINX metrics and logs to New Relic using the OpenTelemetry Collector.'
5+
introFilePath: 'src/install/nginx-otel-host/intro.mdx'
6+
appInfo: []
7+
redirects:
8+
- /docs/infrastructure/host-integrations/host-integrations-list/nginx/nginx-otel-host
9+
steps:
10+
- filePath: 'src/install/nginx-otel-host/host/prerequisites-opensource.mdx'
11+
- filePath: 'src/install/nginx-otel-host/host/enable-status-opensource.mdx'
12+
- filePath: 'src/install/nginx-otel-host/host/configure-collector-opensource.mdx'
13+
- filePath: 'src/install/nginx-otel-host/collector/environment.mdx'
14+
- filePath: 'src/install/nginx-otel-host/logs/forwarding-opensource.mdx'
15+
- filePath: 'src/install/nginx-otel-host/host/verify.mdx'
16+
whatsNextFilePath: 'src/install/nginx-otel-host/whatsNext.mdx'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
agentName: nginx-otel-kubernetes
2+
agentType: integration
3+
title: 'Monitor NGINX on Kubernetes with OpenTelemetry'
4+
metaDescription: 'Send your NGINX metrics and logs from Kubernetes to New Relic using the OpenTelemetry Collector.'
5+
introFilePath: 'src/install/nginx-otel-kubernetes/intro.mdx'
6+
appInfo: []
7+
redirects:
8+
- /docs/infrastructure/host-integrations/host-integrations-list/nginx/nginx-otel-kubernetes
9+
steps:
10+
- filePath: 'src/install/nginx-otel-kubernetes/kubernetes/prerequisites.mdx'
11+
- filePath: 'src/install/nginx-otel-kubernetes/kubernetes/install-collector.mdx'
12+
- filePath: 'src/install/nginx-otel-kubernetes/kubernetes/verify.mdx'
13+
whatsNextFilePath: 'src/install/nginx-otel-kubernetes/whatsNext.mdx'

src/install/config/nginx-otel.yaml

Lines changed: 0 additions & 224 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
agentName: nginx-plus-otel
2+
agentType: integration
3+
title: 'Monitor self-hosted NGINX Plus with OpenTelemetry'
4+
metaDescription: 'Send your NGINX Plus metrics to New Relic using the OpenTelemetry contirb collector.'
5+
introFilePath: 'src/install/nginx-plus-otel/intro.mdx'
6+
appInfo: []
7+
redirects:
8+
- /docs/infrastructure/host-integrations/host-integrations-list/nginx/nginx-plus-otel
9+
steps:
10+
- filePath: 'src/install/nginx-plus-otel/host/prerequisites-plus.mdx'
11+
- filePath: 'src/install/nginx-plus-otel/host/enable-status-plus.mdx'
12+
- filePath: 'src/install/nginx-plus-otel/host/configure-collector-plus.mdx'
13+
- filePath: 'src/install/nginx-plus-otel/collector/environment.mdx'
14+
- filePath: 'src/install/nginx-plus-otel/logs/forwarding-plus.mdx'
15+
- filePath: 'src/install/nginx-plus-otel/host/verify.mdx'
16+
whatsNextFilePath: 'src/install/nginx-plus-otel/whatsNext.mdx'
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
headingText: Set environment variables for the collector
3+
componentType: default
4+
---
5+
6+
Inject your New Relic <InlinePopover type="licenseKey"/> and OTLP endpoint into the collector service so the exporter can authenticate.
7+
8+
1. Create a systemd override directory:
9+
```bash
10+
sudo mkdir -p /etc/systemd/system/otelcol-contrib.service.d
11+
```
12+
2. Write `environment.conf` with your OTLP endpoint. Replace `YOUR_LICENSE_KEY` with the New Relic license key and `YOUR_OTLP_ENDPOINT` with the appropriate endpoint for your region. Refer to the OTLP endpoint configuration [documentation](https://docs.newrelic.com/docs/opentelemetry/best-practices/opentelemetry-otlp/#configure-endpoint-port-protocol) to select the right endpoint.
13+
14+
```bash
15+
cat <<EOF | sudo tee /etc/systemd/system/otelcol-contrib.service.d/environment.conf
16+
[Service]
17+
Environment="NEWRELIC_OTLP_ENDPOINT=YOUR_OTLP_ENDPOINT"
18+
Environment="NEWRELIC_LICENSE_KEY=YOUR_LICENSE_KEY"
19+
EOF
20+
```
21+
3. Reload systemd and restart the collector:
22+
```bash
23+
sudo systemctl daemon-reload
24+
sudo systemctl restart otelcol-contrib.service
25+
```

src/install/nginx-otel/host/configure-collector-opensource.mdx renamed to src/install/nginx-otel-host/host/configure-collector-opensource.mdx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
2-
headingText: Configure the collector for NGINX metrics
2+
headingText: Configure the OpenTelemetry Collector
33
componentType: default
44
---
55

6-
Create or replace `/etc/otelcol-contrib/config.yaml` with the configuration below. This enables the NGINX receiver, enriches metrics with resource attributes, and sends them to New Relic over OTLP.
6+
In the below OpenTelemetry Collector config snippet:
77

8+
- Update the `nginx.deployment.name` value to with a unique name to identify this NGINX server in a New Relic account.
89
- Update the `endpoint` and `nginx.server.endpoint` value to match your stub status path and port.
9-
- Update the `nginx.deployment.name` value to with a unique name to identify this NGINX server in New Relic.
10+
11+
Merge the receivers, processors, exporters, and service pipelines from the snippet below into your current configuration (typically located at `/etc/otelcol-contrib/config.yaml`).
1012

1113
```yaml
1214
receivers:
@@ -52,9 +54,6 @@ exporters:
5254
endpoint: ${env:NEWRELIC_OTLP_ENDPOINT}
5355
headers:
5456
api-key: ${env:NEWRELIC_LICENSE_KEY}
55-
compression: gzip
56-
extensions:
57-
health_check:
5857
service:
5958
pipelines:
6059
metrics:

src/install/nginx-otel/host/enable-status-opensource.mdx renamed to src/install/nginx-otel-host/host/enable-status-opensource.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
headingText: Configure NGINX Open Source
2+
headingText: Configure NGINX
33
componentType: default
44
---
55

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
headingText: Check the compatibility and requirements
3+
componentType: default
4+
---
5+
Before you begin, ensure you have:
6+
7+
- A [New Relic account](https://newrelic.com/signup) with a <InlinePopover type="licenseKey"/>
8+
- NGINX with the [HTTP stub status](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html) module enabled
9+
- [OpenTelemetry Collector Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/latest) installed and running on a linux host
10+
- Network access from the linux host to:
11+
- NGINX HTTP stub status endpoint
12+
- Anyone of the [New Relic OTLP](https://docs.newrelic.com/docs/opentelemetry/best-practices/opentelemetry-otlp/#configure-endpoint-port-protocol:~:text=HTTP-,Endpoint,-Supported%20ports) enpoint

src/install/nginx-otel/host/verify.mdx renamed to src/install/nginx-otel-host/host/verify.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ componentType: default
44
---
55

66
1. Go to **[one.newrelic.com](https://one.newrelic.com) > Integrations & Agents**.
7-
2. Select **Dashboards**, and click **NGINX overview dashboard**.
7+
2. Select **Dashboards**, and click **NGINX OTel overview dashboard**.
88
3. In the popup window, select your account.
99
4. Click View dashboard, and see your NGINX data in New Relic.
1010

1111
The NGINX metrics are attached to the `Metric` [event type](/docs/using-new-relic/data/understand-data/new-relic-data-types#events-new-relic). You can [query this data](/docs/using-new-relic/data/understand-data/query-new-relic-data) for troubleshooting purposes or to create custom charts and dashboards.
12-
13-
You can find a full list of metrics and their attributes in the "Metrics collected" section at the end of this guide.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
headingText: Before you start
3+
componentType: default
4+
---
5+
6+
Monitor your NGINX servers using the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-contrib) to send metrics and telemetry data to New Relic.
7+
This integration leverages the OpenTelemetry [nginxreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/nginxreceiver) to monitor your NGINX performance metrics, connection statistics, and server health.

0 commit comments

Comments
 (0)