Skip to content

Commit af8a62b

Browse files
mjangADubhlaoich
andauthored
fix: minimize reference to metrics (#426)
* fix: minimize reference to metrics --------- Co-authored-by: Alan Dooley <[email protected]>
1 parent 77939c1 commit af8a62b

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

content/includes/use-cases/monitoring/enable-nginx-plus-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
docs:
33
files:
44
- content/nim/monitoring/overview-metrics.md
5-
- content/nginx-one/getting-started.md
5+
- content/nginx-one/getting-started.md
66
---
7-
7+
<!-- include in content/nginx-one/getting-started.md disabled, hopefully temporarily -->
88
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):
99

1010
```nginx

content/nginx-one/getting-started.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,41 @@ If you followed the [Installation and upgrade](https://docs.nginx.com/nginx-agen
136136
137137
## Enable NGINX metrics reporting
138138
139-
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).
139+
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.
140140
141141
### Enable NGINX Plus API
142142
143-
{{< include "/use-cases/monitoring/enable-nginx-plus-api.md" >}}
143+
<!-- possible future include: "/use-cases/monitoring/enable-nginx-plus-api.md" -->
144+
To collect metrics for NGINX Plus, add the following to your NGINX Plus configuration file:
145+
146+
```nginx
147+
# Enable the /api/ location with appropriate access control
148+
# to use the NGINX Plus API.
149+
#
150+
location /api/ {
151+
api write=on;
152+
allow 127.0.0.1;
153+
deny all;
154+
}
155+
```
156+
157+
This configuration:
158+
159+
- Enables the NGINX Plus API.
160+
- Allows requests only from `127.0.0.1` (localhost).
161+
- Blocks all other requests for security.
162+
163+
After saving the changes, reload NGINX to apply the new configuration:
164+
165+
```shell
166+
nginx -s reload
167+
```
144168
145169
### Enable NGINX Open Source Stub Status API
146170
147171
{{< include "/use-cases/monitoring/enable-nginx-oss-stub-status.md" >}}
148172
149-
---
173+
---
150174
151175
## View instance metrics with the NGINX One dashboard
152176

0 commit comments

Comments
 (0)