Skip to content

fix: minimize reference to metrics #426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
docs:
files:
- content/nim/monitoring/overview-metrics.md
- content/nginx-one/getting-started.md
- content/nginx-one/getting-started.md
---

<!-- include in content/nginx-one/getting-started.md disabled, hopefully temporarily -->
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
Expand Down
30 changes: 27 additions & 3 deletions content/nginx-one/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,41 @@ 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).
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

{{< include "/use-cases/monitoring/enable-nginx-plus-api.md" >}}
<!-- possible future 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

Expand Down
Loading