From 08e1f5b076b9ff5092f6cd7b1c4777f46f06868d Mon Sep 17 00:00:00 2001 From: Aphral Griffin Date: Mon, 6 Oct 2025 13:33:53 +0100 Subject: [PATCH 01/10] feat: Add custom OTel configuration section --- .../agent/metrics/configure-otel-metrics.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/metrics/configure-otel-metrics.md index 598017cf8..c9771fd1a 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/metrics/configure-otel-metrics.md @@ -39,3 +39,91 @@ You can validate that metrics are successfully exported by using the methods bel ```text Everything is ready. Begin running and processing data. ``` + +### Custom OTel Configuration + +NGINX Agent generates a default OpenTelemetry config to send metrics to your management plane located at `/etc/nginx-agent/opentelemetry-collector-agent.yaml`. An option is provided to +bring your own OpenTelemetry configs which will be merged with the NGINX Agent default config. + +OpenTelemetry will merge your [OpenTelemetry Config](https://opentelemetry.io/). The order of the OpenTelemetry config files matters, +the last config in the list will take priority over others listed if they have the same value configured. + +To have NGINX Agent use your own OpenTelemetry config: + +1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf` +2. Add the collector property + +```yaml +collector: + additional_config_paths: + - "/my_config.yaml" +``` + +### Example usage: + +{{< call-out "important" >}} NGINX Agent uses `/default` for naming its default processors, exporters and pipelines using the same naming in your own config might cause issues with sending metrics to your management plane {{< /call-out >}} + +#### Add Prometheus Exporter +```yaml +exporters: + prometheus: + endpoint: "127.0.0.1:5643" + resource_to_telemetry_conversion: + enabled: true + +service: + pipelines: + metrics/prometheus-example-pipeline: + receivers: + - containermetrics + - hostmetrics + processors: + - resource/default + exporters: + - prometheus +``` + +#### Add Debug Exporter +```yaml +exporters: + debug: + verbosity: detailed + sampling_initial: 5 + sampling_thereafter: 200 + +service: + pipelines: + metrics/debug-example-pipeline: + receivers: + - containermetrics + - hostmetrics + processors: + - resource/default + exporters: + - debug +``` + + +#### Debug Merging Configs + +To view the merged OpenTelemetry configuration set the Agent log level to debug in `/etc/nginx-agent/nginx-agent.conf` and restart NGINX Agent + +1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf` +2. Change the log property +```yaml +log: + level: debug +``` +3. Restart NGINX Agent +4. View merged OpenTelemetry configuration `cat /var/lib/nginx-agent/opentelemetry-collector-agent-debug.yaml` + + + + + + + + + + + From b94a78da677166019850af406a91e10241dceadd Mon Sep 17 00:00:00 2001 From: Aphral Griffin Date: Mon, 6 Oct 2025 13:44:06 +0100 Subject: [PATCH 02/10] feat: change section headings --- .../agent/metrics/configure-otel-metrics.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/metrics/configure-otel-metrics.md index c9771fd1a..c9388a5f0 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/metrics/configure-otel-metrics.md @@ -63,7 +63,7 @@ collector: {{< call-out "important" >}} NGINX Agent uses `/default` for naming its default processors, exporters and pipelines using the same naming in your own config might cause issues with sending metrics to your management plane {{< /call-out >}} -#### Add Prometheus Exporter +- **Add Prometheus Exporter** ```yaml exporters: prometheus: @@ -83,7 +83,7 @@ service: - prometheus ``` -#### Add Debug Exporter +- **Add Debug Exporter** ```yaml exporters: debug: @@ -104,7 +104,7 @@ service: ``` -#### Debug Merging Configs +### Debug Merging Configs To view the merged OpenTelemetry configuration set the Agent log level to debug in `/etc/nginx-agent/nginx-agent.conf` and restart NGINX Agent @@ -116,14 +116,3 @@ log: ``` 3. Restart NGINX Agent 4. View merged OpenTelemetry configuration `cat /var/lib/nginx-agent/opentelemetry-collector-agent-debug.yaml` - - - - - - - - - - - From 5c7c341217fde8676b10f81c142089b8491c9f8b Mon Sep 17 00:00:00 2001 From: Aphral Griffin Date: Mon, 6 Oct 2025 14:25:29 +0100 Subject: [PATCH 03/10] feat: add third party otel collector example --- .../agent/metrics/configure-otel-metrics.md | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/metrics/configure-otel-metrics.md index c9388a5f0..cc0396725 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/metrics/configure-otel-metrics.md @@ -64,6 +64,10 @@ collector: {{< call-out "important" >}} NGINX Agent uses `/default` for naming its default processors, exporters and pipelines using the same naming in your own config might cause issues with sending metrics to your management plane {{< /call-out >}} - **Add Prometheus Exporter** + +{{< tabs name="prometheus-exporter" >}} +{{% tab name="NGINX Plus" %}} + ```yaml exporters: prometheus: @@ -77,13 +81,132 @@ service: receivers: - containermetrics - hostmetrics + - nginxplus processors: - resource/default exporters: - prometheus ``` +{{% /tab %}} +{{% tab name="NGINX OSS" %}} + +```yaml +exporters: + prometheus: + endpoint: "127.0.0.1:5643" + resource_to_telemetry_conversion: + enabled: true + +service: + pipelines: + metrics/prometheus-example-pipeline: + receivers: + - containermetrics + - hostmetrics + - nginx + processors: + - resource/default + exporters: + - prometheus +``` + +{{% /tab %}} +{{< /tabs >}} + + +- **Third-party OTel Collector** + +{{< tabs name="third-party-collector" >}} +{{% tab name="NGINX Plus" %}} + +```yaml +exporters: + otlp/local-collector: + endpoint: "my-local-collector.com:443" + timeout: 10s + retry_on_failure: + enabled: true + initial_interval: 10s + max_interval: 60s + max_elapsed_time: 10m + tls: + insecure: true + +service: + pipelines: + metrics/otlp-example-pipeline: + receivers: + - containermetrics + - hostmetrics + - nginxplus + processors: + - resource/default + exporters: + - otpl/local-collector +``` + +{{% /tab %}} +{{% tab name="NGINX OSS" %}} + +```yaml +exporters: + otlp/local-collector: + endpoint: "my-local-collector.com:443" + timeout: 10s + retry_on_failure: + enabled: true + initial_interval: 10s + max_interval: 60s + max_elapsed_time: 10m + tls: + insecure: true + +service: + pipelines: + metrics/otlp-example-pipeline: + receivers: + - containermetrics + - hostmetrics + - nginx + processors: + - resource/default + exporters: + - otpl/local-collector +``` + +{{% /tab %}} +{{< /tabs >}} + + - **Add Debug Exporter** + +{{< tabs name="debug-exporter" >}} +{{% tab name="NGINX Plus" %}} + +```yaml +exporters: + debug: + verbosity: detailed + sampling_initial: 5 + sampling_thereafter: 200 + +service: + pipelines: + metrics/debug-example-pipeline: + receivers: + - containermetrics + - hostmetrics + - nginxplus + processors: + - resource/default + exporters: + - debug +``` + +{{% /tab %}} +{{% tab name="NGINX OSS" %}} + ```yaml exporters: debug: @@ -97,12 +220,17 @@ service: receivers: - containermetrics - hostmetrics + - nginx processors: - resource/default exporters: - debug ``` +{{% /tab %}} +{{< /tabs >}} + + ### Debug Merging Configs From ddc8ae19b5b75134df61ae5e69074464f67c05d0 Mon Sep 17 00:00:00 2001 From: Aphral Griffin Date: Mon, 6 Oct 2025 14:31:10 +0100 Subject: [PATCH 04/10] feat: clean up examples --- .../agent/metrics/configure-otel-metrics.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/metrics/configure-otel-metrics.md index cc0396725..10d7adfbe 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/metrics/configure-otel-metrics.md @@ -79,8 +79,6 @@ service: pipelines: metrics/prometheus-example-pipeline: receivers: - - containermetrics - - hostmetrics - nginxplus processors: - resource/default @@ -102,8 +100,6 @@ service: pipelines: metrics/prometheus-example-pipeline: receivers: - - containermetrics - - hostmetrics - nginx processors: - resource/default @@ -137,8 +133,6 @@ service: pipelines: metrics/otlp-example-pipeline: receivers: - - containermetrics - - hostmetrics - nginxplus processors: - resource/default @@ -166,8 +160,6 @@ service: pipelines: metrics/otlp-example-pipeline: receivers: - - containermetrics - - hostmetrics - nginx processors: - resource/default @@ -195,8 +187,6 @@ service: pipelines: metrics/debug-example-pipeline: receivers: - - containermetrics - - hostmetrics - nginxplus processors: - resource/default @@ -218,8 +208,6 @@ service: pipelines: metrics/debug-example-pipeline: receivers: - - containermetrics - - hostmetrics - nginx processors: - resource/default @@ -232,7 +220,7 @@ service: -### Debug Merging Configs +### Troubleshooting To view the merged OpenTelemetry configuration set the Agent log level to debug in `/etc/nginx-agent/nginx-agent.conf` and restart NGINX Agent From ee37fac01729f14425803e6f34c27a13ee449a3e Mon Sep 17 00:00:00 2001 From: Aphral Griffin Date: Tue, 4 Nov 2025 10:12:37 +0000 Subject: [PATCH 05/10] feat: update links and format --- content/nginx-one/agent/metrics/configure-otel-metrics.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/metrics/configure-otel-metrics.md index 10d7adfbe..ba398fbaa 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/metrics/configure-otel-metrics.md @@ -45,13 +45,13 @@ You can validate that metrics are successfully exported by using the methods bel NGINX Agent generates a default OpenTelemetry config to send metrics to your management plane located at `/etc/nginx-agent/opentelemetry-collector-agent.yaml`. An option is provided to bring your own OpenTelemetry configs which will be merged with the NGINX Agent default config. -OpenTelemetry will merge your [OpenTelemetry Config](https://opentelemetry.io/). The order of the OpenTelemetry config files matters, -the last config in the list will take priority over others listed if they have the same value configured. +OpenTelemetry will merge your [OpenTelemetry Config](https://opentelemetry.io/docs/collector/configuration/). The **order of the OpenTelemetry config files matters**, the last config in the list will take priority over others listed if they have the same value configured. To have NGINX Agent use your own OpenTelemetry config: 1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf` 2. Add the collector property +3. Save and restart the NGINX agent service `sudo systemctl restart nginx-agent` ```yaml collector: @@ -59,7 +59,7 @@ collector: - "/my_config.yaml" ``` -### Example usage: +#### Example usage {{< call-out "important" >}} NGINX Agent uses `/default` for naming its default processors, exporters and pipelines using the same naming in your own config might cause issues with sending metrics to your management plane {{< /call-out >}} From 28de80a9660965165af0d6479e988ee9b7460d1b Mon Sep 17 00:00:00 2001 From: aphralG <108004222+aphralG@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:29:32 +0000 Subject: [PATCH 06/10] Apply suggestions from code review Co-authored-by: Jon Torre <78599298+JTorreG@users.noreply.github.com> Co-authored-by: Donal Hurley --- .../agent/metrics/configure-otel-metrics.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/metrics/configure-otel-metrics.md index ba398fbaa..727fd201a 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/metrics/configure-otel-metrics.md @@ -42,21 +42,21 @@ You can validate that metrics are successfully exported by using the methods bel ### Custom OTel Configuration -NGINX Agent generates a default OpenTelemetry config to send metrics to your management plane located at `/etc/nginx-agent/opentelemetry-collector-agent.yaml`. An option is provided to -bring your own OpenTelemetry configs which will be merged with the NGINX Agent default config. +NGINX Agent generates a default OpenTelemetry config (located at `/etc/nginx-agent/opentelemetry-collector-agent.yaml`) to send metrics to your management plane. An option is provided to +bring your own [OpenTelemetry configs](https://opentelemetry.io/docs/collector/configuration/) which will be merged with the NGINX Agent default config. -OpenTelemetry will merge your [OpenTelemetry Config](https://opentelemetry.io/docs/collector/configuration/). The **order of the OpenTelemetry config files matters**, the last config in the list will take priority over others listed if they have the same value configured. +The **order of the OpenTelemetry config files matters**: the last config in the list will take priority over others listed, if they have the same value configured. To have NGINX Agent use your own OpenTelemetry config: -1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf` +1. Edit the configuration file as root `vim /etc/nginx-agent/nginx-agent.conf` 2. Add the collector property 3. Save and restart the NGINX agent service `sudo systemctl restart nginx-agent` ```yaml collector: additional_config_paths: - - "/my_config.yaml" + - "/etc/nginx-agent/my_config.yaml" ``` #### Example usage @@ -74,6 +74,7 @@ exporters: endpoint: "127.0.0.1:5643" resource_to_telemetry_conversion: enabled: true + namespace: test-space service: pipelines: @@ -95,6 +96,7 @@ exporters: endpoint: "127.0.0.1:5643" resource_to_telemetry_conversion: enabled: true + namespace: test-space service: pipelines: @@ -222,13 +224,10 @@ service: ### Troubleshooting -To view the merged OpenTelemetry configuration set the Agent log level to debug in `/etc/nginx-agent/nginx-agent.conf` and restart NGINX Agent +To view the merged OpenTelemetry configuration set the NGINX Agent log level to "debug" in `/etc/nginx-agent/nginx-agent.conf`, and restart NGINX Agent: 1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf` -2. Change the log property -```yaml -log: - level: debug -``` -3. Restart NGINX Agent -4. View merged OpenTelemetry configuration `cat /var/lib/nginx-agent/opentelemetry-collector-agent-debug.yaml` +1. Change the log property + ```yaml + log: + level: debug From 1e6b8da0c169ea3e47454a1974ae3aeaa4fdc7fe Mon Sep 17 00:00:00 2001 From: aphralG <108004222+aphralG@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:58:01 +0000 Subject: [PATCH 07/10] Apply suggestions from code review Co-authored-by: Alan Dooley --- .../agent/metrics/configure-otel-metrics.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/metrics/configure-otel-metrics.md index 727fd201a..a14df1836 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/metrics/configure-otel-metrics.md @@ -50,8 +50,8 @@ The **order of the OpenTelemetry config files matters**: the last config in the To have NGINX Agent use your own OpenTelemetry config: 1. Edit the configuration file as root `vim /etc/nginx-agent/nginx-agent.conf` -2. Add the collector property -3. Save and restart the NGINX agent service `sudo systemctl restart nginx-agent` +1. Add the collector property +1. Save and restart the NGINX agent service `sudo systemctl restart nginx-agent` ```yaml collector: @@ -63,7 +63,7 @@ collector: {{< call-out "important" >}} NGINX Agent uses `/default` for naming its default processors, exporters and pipelines using the same naming in your own config might cause issues with sending metrics to your management plane {{< /call-out >}} -- **Add Prometheus Exporter** +To add a Prometheus exporter: {{< tabs name="prometheus-exporter" >}} {{% tab name="NGINX Plus" %}} @@ -113,7 +113,7 @@ service: {{< /tabs >}} -- **Third-party OTel Collector** +To add a third-party OpenTelemetry Collector: {{< tabs name="third-party-collector" >}} {{% tab name="NGINX Plus" %}} @@ -173,7 +173,7 @@ service: {{< /tabs >}} -- **Add Debug Exporter** +To add a debug exporter: {{< tabs name="debug-exporter" >}} {{% tab name="NGINX Plus" %}} @@ -224,10 +224,8 @@ service: ### Troubleshooting -To view the merged OpenTelemetry configuration set the NGINX Agent log level to "debug" in `/etc/nginx-agent/nginx-agent.conf`, and restart NGINX Agent: +To view the merged OpenTelemetry configuration, change the NGINX Agent log level to "debug" in `/etc/nginx-agent/nginx-agent.conf`: -1. Edit the configuration file `sudo vim /etc/nginx-agent/nginx-agent.conf` -1. Change the log property - ```yaml - log: - level: debug +```yaml + log: + level: debug From d1c80b039807529b4136bd59273c0f29c536ee5c Mon Sep 17 00:00:00 2001 From: Aphral Griffin Date: Mon, 10 Nov 2025 14:22:06 +0000 Subject: [PATCH 08/10] feat: address PR feedback --- .../agent/metrics/configure-otel-metrics.md | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/metrics/configure-otel-metrics.md index a14df1836..4a38eee9e 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/metrics/configure-otel-metrics.md @@ -112,7 +112,6 @@ service: {{% /tab %}} {{< /tabs >}} - To add a third-party OpenTelemetry Collector: {{< tabs name="third-party-collector" >}} @@ -122,14 +121,6 @@ To add a third-party OpenTelemetry Collector: exporters: otlp/local-collector: endpoint: "my-local-collector.com:443" - timeout: 10s - retry_on_failure: - enabled: true - initial_interval: 10s - max_interval: 60s - max_elapsed_time: 10m - tls: - insecure: true service: pipelines: @@ -149,14 +140,6 @@ service: exporters: otlp/local-collector: endpoint: "my-local-collector.com:443" - timeout: 10s - retry_on_failure: - enabled: true - initial_interval: 10s - max_interval: 60s - max_elapsed_time: 10m - tls: - insecure: true service: pipelines: @@ -172,7 +155,6 @@ service: {{% /tab %}} {{< /tabs >}} - To add a debug exporter: {{< tabs name="debug-exporter" >}} @@ -220,8 +202,6 @@ service: {{% /tab %}} {{< /tabs >}} - - ### Troubleshooting To view the merged OpenTelemetry configuration, change the NGINX Agent log level to "debug" in `/etc/nginx-agent/nginx-agent.conf`: From e66d74b0ad209d39bb0a10ae07a48b6505238143 Mon Sep 17 00:00:00 2001 From: nginx-seanmoloney Date: Tue, 11 Nov 2025 10:41:07 +0000 Subject: [PATCH 09/10] docs: Enhance NGINX metrics export documentation - Refined the overview section for improved readability and clarity. - Clearly identified default behavior (metrics sent to NGINX One Console). - Added links to relevant NGINX One documentation. - Improved Docker command formatting for readability and ease of use. - Expanded troubleshooting section to include example failure log entries. - Fixed minor formatting issues and typos (e.g., parenthesis, capitalization in section titles). - Added inline comments and additional details for configuration steps. --- .../agent/metrics/configure-otel-metrics.md | 142 ++++++------------ 1 file changed, 49 insertions(+), 93 deletions(-) diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/metrics/configure-otel-metrics.md index 4a38eee9e..43b4fc904 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/metrics/configure-otel-metrics.md @@ -7,19 +7,23 @@ nd-docs: DOCS-1882 ## Overview -F5 NGINX Agent now includes an embedded [OpenTelemetry](https://opentelemetry.io/) collector, streamlining observability and metric collection for NGINX instances. With this feature, you can collect: +The F5 NGINX Agent now includes an embedded [OpenTelemetry](https://opentelemetry.io) collector, streamlining observability and metric collection for NGINX instances. By default, the NGINX Agent sends key metrics to the [NGINX One Console]({{< ref "/nginx-one/nginx-configs/metrics/review-metrics" >}}), providing quick visibility into server performance through pre-configured dashboards. -* Metrics from NGINX Plus and NGINX Open Source -* Host metrics (CPU, memory, disk, and network activity) from VMs or Containers +With this feature, you can collect: + + - Metrics from NGINX Plus and NGINX Open Source + - Host metrics such as CPU, memory, disk, and network activity from virtual machines (VMs) or containers + +For users requiring deeper integration with third-party observability tools, the NGINX Agent supports exporting additional metrics through the embedded OpenTelemetry collector. Tools such as Prometheus, Splunk, and other OpenTelemetry-compatible platforms can be configured to ingest these metrics, as detailed in the rest of this document. {{< call-out "note" >}} -The OpenTelemetry exporter is enabled by default. Once a valid connection to the management plane is established, the Agent will automatically begin exporting metrics. -{{< /call-out >}} +The OpenTelemetry exporter is enabled by default. Once a valid connection to the management plane is established, the NGINX Agent will automatically begin exporting metrics to the NGINX One Console. +{{< /call-out >}} ### Key benefits * Seamless Integration: No need to deploy an external OpenTelemetry Collector. All components are embedded within the Agent for streamlined observability. -* Standardized Protocol: Support for OpenTelemetry standards ensures interoperability with a wide range of observability backends, including Jaeger, Prometheus, Splunk, and more. +* Standardized Protocol: Support for OpenTelemetry standards ensures interoperability with a wide range of observability backends, including Prometheus, Splunk, and more. ### Verify that metrics are exported @@ -47,48 +51,51 @@ bring your own [OpenTelemetry configs](https://opentelemetry.io/docs/collector/c The **order of the OpenTelemetry config files matters**: the last config in the list will take priority over others listed, if they have the same value configured. -To have NGINX Agent use your own OpenTelemetry config: +{{}} + +{{%tab name="VM"%}} 1. Edit the configuration file as root `vim /etc/nginx-agent/nginx-agent.conf` 1. Add the collector property 1. Save and restart the NGINX agent service `sudo systemctl restart nginx-agent` -```yaml -collector: - additional_config_paths: - - "/etc/nginx-agent/my_config.yaml" -``` + ```yaml + collector: + additional_config_paths: + - "/etc/nginx-agent/my_config.yaml" + ``` -#### Example usage +{{%/tab%}} -{{< call-out "important" >}} NGINX Agent uses `/default` for naming its default processors, exporters and pipelines using the same naming in your own config might cause issues with sending metrics to your management plane {{< /call-out >}} +{{%tab name="Container"%}} -To add a Prometheus exporter: +1. Run the Docker container: -{{< tabs name="prometheus-exporter" >}} -{{% tab name="NGINX Plus" %}} +Use the following command to run the NGINX Agent docker container. Replace the placeholder values (`YOUR_JWT_HERE`, `DPK`, `/path/to/my_config.yaml`, and ``) with the appropriate values for your environment: -```yaml -exporters: - prometheus: - endpoint: "127.0.0.1:5643" - resource_to_telemetry_conversion: - enabled: true - namespace: test-space + ```bash + sudo docker run \ + --env=NGINX_LICENSE_JWT="YOUR_JWT_HERE" \ + --env=NGINX_AGENT_COMMAND_SERVER_PORT=443 \ + --env=NGINX_AGENT_COMMAND_SERVER_HOST=agent.connect.nginx.com \ + --env=NGINX_AGENT_COMMAND_AUTH_TOKEN="DPK" \ + --env=NGINX_AGENT_COMMAND_TLS_SKIP_VERIFY=false \ + --env=NGINX_AGENT_COLLECTOR_ADDITIONAL_CONFIG_PATHS="/etc/nginx-agent/my_config.yaml" \ + --volume=/path/to/my_config.yaml:/etc/nginx-agent/my_config.yaml:ro \ + --restart=always \ + --runtime=runc \ + -d private-registry.nginx.com/nginx-plus/agentv3: + ``` -service: - pipelines: - metrics/prometheus-example-pipeline: - receivers: - - nginxplus - processors: - - resource/default - exporters: - - prometheus -``` +{{%/tab%}} -{{% /tab %}} -{{% tab name="NGINX OSS" %}} +{{}} + +#### Example usage + +{{< call-out "important" >}} NGINX Agent uses `/default` for naming its default processors, exporters and pipelines using the same naming in your own config might cause issues with sending metrics to your management plane {{< /call-out >}} + +#### Add Prometheus Exporter Configuration ```yaml exporters: @@ -102,20 +109,16 @@ service: pipelines: metrics/prometheus-example-pipeline: receivers: - - nginx + - nginxplus/nginx # Use nginxplus for NGINX Plus or nginx for OSS processors: - resource/default exporters: - prometheus ``` -{{% /tab %}} -{{< /tabs >}} -To add a third-party OpenTelemetry Collector: -{{< tabs name="third-party-collector" >}} -{{% tab name="NGINX Plus" %}} +#### Third-party OTel Collector ```yaml exporters: @@ -126,39 +129,14 @@ service: pipelines: metrics/otlp-example-pipeline: receivers: - - nginxplus + - nginxplus/nginx # Use nginxplus for NGINX Plus or nginx for OSS processors: - resource/default exporters: - - otpl/local-collector + - otlp/local-collector ``` -{{% /tab %}} -{{% tab name="NGINX OSS" %}} - -```yaml -exporters: - otlp/local-collector: - endpoint: "my-local-collector.com:443" - -service: - pipelines: - metrics/otlp-example-pipeline: - receivers: - - nginx - processors: - - resource/default - exporters: - - otpl/local-collector -``` - -{{% /tab %}} -{{< /tabs >}} - -To add a debug exporter: - -{{< tabs name="debug-exporter" >}} -{{% tab name="NGINX Plus" %}} +#### Add Debug Exporter ```yaml exporters: @@ -171,36 +149,14 @@ service: pipelines: metrics/debug-example-pipeline: receivers: - - nginxplus + - nginxplus/nginx # Use nginxplus for NGINX Plus or nginx for OSS processors: - resource/default exporters: - debug ``` -{{% /tab %}} -{{% tab name="NGINX OSS" %}} - -```yaml -exporters: - debug: - verbosity: detailed - sampling_initial: 5 - sampling_thereafter: 200 - -service: - pipelines: - metrics/debug-example-pipeline: - receivers: - - nginx - processors: - - resource/default - exporters: - - debug -``` -{{% /tab %}} -{{< /tabs >}} ### Troubleshooting From d49f9f3affb3893f9c1396a3c757485b70108fbf Mon Sep 17 00:00:00 2001 From: Jon Cahill-Torre Date: Tue, 11 Nov 2025 17:11:20 +0000 Subject: [PATCH 10/10] docs: move single item in section to root section --- content/includes/agent/about.md | 2 +- .../nginx-one/agent/{metrics => }/configure-otel-metrics.md | 4 ++-- content/nginx-one/agent/metrics/_index.md | 5 ----- 3 files changed, 3 insertions(+), 8 deletions(-) rename content/nginx-one/agent/{metrics => }/configure-otel-metrics.md (98%) delete mode 100644 content/nginx-one/agent/metrics/_index.md diff --git a/content/includes/agent/about.md b/content/includes/agent/about.md index e0f08219a..fccce5514 100644 --- a/content/includes/agent/about.md +++ b/content/includes/agent/about.md @@ -19,7 +19,7 @@ Real-time observability into NGINX One data plane instances: - Provides live monitoring and actionable insights into the performance, status, and health of NGINX One data plane instances, improving decision-making and operational efficiency. - NGINX Agent supports [OpenTelemetry](https://opentelemetry.io/) and the ability to - [export the metrics data]({{< ref "/nginx-one/agent/metrics/configure-otel-metrics.md" >}}) for use in other applications. + [export the metrics data]({{< ref "/nginx-one/agent/configure-otel-metrics.md" >}}) for use in other applications. diff --git a/content/nginx-one/agent/metrics/configure-otel-metrics.md b/content/nginx-one/agent/configure-otel-metrics.md similarity index 98% rename from content/nginx-one/agent/metrics/configure-otel-metrics.md rename to content/nginx-one/agent/configure-otel-metrics.md index 43b4fc904..3c76e46a4 100644 --- a/content/nginx-one/agent/metrics/configure-otel-metrics.md +++ b/content/nginx-one/agent/configure-otel-metrics.md @@ -1,6 +1,6 @@ --- title: Export NGINX instance metrics -weight: 450 +weight: 500 toc: true nd-docs: DOCS-1882 --- @@ -109,7 +109,7 @@ service: pipelines: metrics/prometheus-example-pipeline: receivers: - - nginxplus/nginx # Use nginxplus for NGINX Plus or nginx for OSS + - # Use nginxplus for NGINX Plus or nginx for OSS processors: - resource/default exporters: diff --git a/content/nginx-one/agent/metrics/_index.md b/content/nginx-one/agent/metrics/_index.md deleted file mode 100644 index e089288c1..000000000 --- a/content/nginx-one/agent/metrics/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Metrics" -weight: 500 -url: /nginx-one/agent/metrics/ ---- \ No newline at end of file