From 4438a0e0a06f425313d5d4a91a0a267c502b5056 Mon Sep 17 00:00:00 2001 From: Mike Jang <3287976+mjang@users.noreply.github.com> Date: Wed, 16 Apr 2025 14:11:10 -0700 Subject: [PATCH 1/5] fix: minimize reference to metrics --- .../monitoring/enable-nginx-plus-api.md | 2 +- content/nginx-one/getting-started.md | 32 +++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/content/includes/use-cases/monitoring/enable-nginx-plus-api.md b/content/includes/use-cases/monitoring/enable-nginx-plus-api.md index b0fbe9973..319dbb743 100644 --- a/content/includes/use-cases/monitoring/enable-nginx-plus-api.md +++ b/content/includes/use-cases/monitoring/enable-nginx-plus-api.md @@ -2,7 +2,7 @@ docs: files: - content/nim/monitoring/overview-metrics.md - - content/nginx-one/getting-started.md + --- To collect comprehensive metrics for NGINX Plus--including bytes streamed, information about upstream systems and caches, and counts of all HTTP status codes--add the following to your NGINX Plus configuration file (for example, `/etc/nginx/nginx.conf` or an included file): diff --git a/content/nginx-one/getting-started.md b/content/nginx-one/getting-started.md index 789580da1..77898fa6a 100644 --- a/content/nginx-one/getting-started.md +++ b/content/nginx-one/getting-started.md @@ -136,17 +136,43 @@ If you followed the [Installation and upgrade](https://docs.nginx.com/nginx-agen ## Enable NGINX metrics reporting -In order for NGINX One Console to show specific traffic and system metrics, you need to enable the appropriate API on your NGINX data plane instances. The sections below provide step-by-step instructions for both NGINX Plus and NGINX Open Source (OSS). +NGINX One Console dashboard relies on the NGINX Plus and NGINX Open Source Stub Status APIs to report traffic and system metrics. The following sections include instructions on how to enable those metrics. + ### Enable NGINX Plus API -{{< include "/use-cases/monitoring/enable-nginx-plus-api.md" >}} + +To collect metrics for NGINX Plus, add the following to your NGINX Plus configuration file: + +```nginx +# Enable the /api/ location with appropriate access control +# to use the NGINX Plus API. +# +location /api/ { + api write=on; + allow 127.0.0.1; + deny all; +} +``` + +This configuration: + +- Enables the NGINX Plus API. +- Allows requests only from `127.0.0.1` (localhost). +- Blocks all other requests for security. + +After saving the changes, reload NGINX to apply the new configuration: + +```shell +nginx -s reload +``` ### Enable NGINX Open Source Stub Status API {{< include "/use-cases/monitoring/enable-nginx-oss-stub-status.md" >}} ---- +--- ## View instance metrics with the NGINX One dashboard From 7478741153b882cf81418e4e28edc1bcb7075a32 Mon Sep 17 00:00:00 2001 From: Mike Jang <3287976+mjang@users.noreply.github.com> Date: Wed, 16 Apr 2025 14:21:50 -0700 Subject: [PATCH 2/5] Update content/nginx-one/getting-started.md --- content/nginx-one/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/nginx-one/getting-started.md b/content/nginx-one/getting-started.md index 77898fa6a..c3abface0 100644 --- a/content/nginx-one/getting-started.md +++ b/content/nginx-one/getting-started.md @@ -136,7 +136,7 @@ If you followed the [Installation and upgrade](https://docs.nginx.com/nginx-agen ## Enable NGINX metrics reporting -NGINX One Console dashboard relies on the NGINX Plus and NGINX Open Source Stub Status APIs to report traffic and system metrics. The following sections include instructions on how to enable those metrics. +The NGINX One Console dashboard relies on APIs for NGINX Plus and NGINX Open Source Stub Status to report traffic and system metrics. The following sections include instructions on how to enable those metrics. From af83e1b55b98a86ab2021c76465f087e450a154f Mon Sep 17 00:00:00 2001 From: Mike Jang <3287976+mjang@users.noreply.github.com> Date: Wed, 16 Apr 2025 14:27:59 -0700 Subject: [PATCH 3/5] More --- .../includes/use-cases/monitoring/enable-nginx-plus-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/includes/use-cases/monitoring/enable-nginx-plus-api.md b/content/includes/use-cases/monitoring/enable-nginx-plus-api.md index 319dbb743..d9dd46dc0 100644 --- a/content/includes/use-cases/monitoring/enable-nginx-plus-api.md +++ b/content/includes/use-cases/monitoring/enable-nginx-plus-api.md @@ -2,9 +2,9 @@ docs: files: - content/nim/monitoring/overview-metrics.md - + - content/nginx-one/getting-started.md --- - + To collect comprehensive metrics for NGINX Plus--including bytes streamed, information about upstream systems and caches, and counts of all HTTP status codes--add the following to your NGINX Plus configuration file (for example, `/etc/nginx/nginx.conf` or an included file): ```nginx From 6ebf023436f15bac6e69673910eac654de81db92 Mon Sep 17 00:00:00 2001 From: Mike Jang <3287976+mjang@users.noreply.github.com> Date: Wed, 16 Apr 2025 14:36:39 -0700 Subject: [PATCH 4/5] More --- content/nginx-one/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/nginx-one/getting-started.md b/content/nginx-one/getting-started.md index c3abface0..d94cc4b11 100644 --- a/content/nginx-one/getting-started.md +++ b/content/nginx-one/getting-started.md @@ -142,7 +142,7 @@ In order for NGINX One Console to show specific traffic and system metrics, you ### Enable NGINX Plus API - + To collect metrics for NGINX Plus, add the following to your NGINX Plus configuration file: ```nginx From 52d98d4bc2e94faca2a24b80633f84dfacdb0b21 Mon Sep 17 00:00:00 2001 From: Mike Jang <3287976+mjang@users.noreply.github.com> Date: Thu, 17 Apr 2025 06:55:35 -0700 Subject: [PATCH 5/5] Update content/nginx-one/getting-started.md --- content/nginx-one/getting-started.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/nginx-one/getting-started.md b/content/nginx-one/getting-started.md index d94cc4b11..9e3a0e8e5 100644 --- a/content/nginx-one/getting-started.md +++ b/content/nginx-one/getting-started.md @@ -136,9 +136,7 @@ If you followed the [Installation and upgrade](https://docs.nginx.com/nginx-agen ## Enable NGINX metrics reporting -The NGINX One Console dashboard relies on APIs for NGINX Plus and NGINX Open Source Stub Status to report traffic and system metrics. The following sections include instructions on how to enable those metrics. - +The NGINX One Console dashboard relies on APIs for NGINX Plus and NGINX Open Source Stub Status to report traffic and system metrics. The following sections show you how to enable those metrics. ### Enable NGINX Plus API