Skip to content

Commit 66b0517

Browse files
committed
Expose NGINX Plus dashboard (nginx#1488)
* Expose NGINX Plus dashboard Problem: As a user, I want observability into the NGINX Plus configuration and metrics. Solution: By exposing the NGINX Plus dashboard, a user can easily visualize real-time metrics and information about the configuration. * Code review comments * Reapply allow/deny; fix image tag * Arch note
1 parent 68cd652 commit 66b0517

File tree

6 files changed

+54
-3
lines changed

6 files changed

+54
-3
lines changed

internal/mode/static/nginx/conf/nginx-plus.conf

+15
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@ http {
2626
sendfile on;
2727
tcp_nopush on;
2828

29+
server {
30+
listen 127.0.0.1:8765;
31+
root /usr/share/nginx/html;
32+
access_log off;
33+
34+
allow 127.0.0.1;
35+
deny all;
36+
37+
location = /dashboard.html {}
38+
39+
location /api {
40+
api write=off;
41+
}
42+
}
43+
2944
server {
3045
listen unix:/var/run/nginx/nginx-plus-api.sock;
3146
access_log off;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: "NGINX Plus Dashboard"
3+
description: "Learn how to view the NGINX Plus dashboard to see real-time metrics."
4+
weight: 200
5+
toc: true
6+
docs: "DOCS-000"
7+
---
8+
9+
{{<custom-styles>}}
10+
11+
## Overview
12+
13+
The NGINX Plus dashboard offers a real-time live activity monitoring interface that shows key load and performance metrics of your server infrastructure. The dashboard is enabled by default for NGINX Gateway Fabric deployments that use NGINX Plus as the data plane. The dashboard is available on port 8765.
14+
15+
To access the dashboard:
16+
17+
1. Use port-forwarding to forward connections to port 8765 on your local machine to port 8765 on the NGINX Gateway Fabric pod (replace `<nginx-gateway-fabric-pod>` with the actual name of the pod).
18+
19+
```shell
20+
kubectl port-forward <nginx-gateway-fabric-pod> 8765:8765 -n nginx-gateway
21+
```
22+
23+
1. Open your browser to [http://127.0.0.1:8765/dashboard.html](http://127.0.0.1:8765/dashboard.html) to access the dashboard.
24+
25+
The dashboard will look like this:
26+
27+
{{<img src="img/nginx-plus-dashboard.png" alt="">}}
28+
29+
30+
{{< note >}}The [API](https://nginx.org/en/docs/http/ngx_http_api_module.html), which the dashboard uses to get the metrics, is also accessible using the `/api` path.{{< /note >}}

site/content/how-to/monitoring/monitoring.md renamed to site/content/how-to/monitoring/prometheus.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: "Monitoring NGINX Gateway Fabric"
3-
description: "Learn how to monitor your NGINX Gateway Fabric effectively. This guide provides easy steps for configuring monitoring settings and understanding key performance metrics."
2+
title: "Prometheus Metrics"
3+
description: "Learn how to monitor your NGINX Gateway Fabric effectively. This guide provides easy steps for configuring and understanding key performance metrics using Prometheus."
44
weight: 100
55
toc: true
66
docs: "DOCS-000"

site/content/how-to/monitoring/troubleshooting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Troubleshooting"
33

4-
weight: 200
4+
weight: 300
55
toc: true
66
docs: "DOCS-000"
77
---

site/content/overview/gateway-architecture.md

+6
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ The following list describes the connections, preceeded by their types in parent
9292
1. (HTTP, HTTPS) A _client_ sends traffic to and receives traffic from any of the _NGINX workers_ on ports 80 and 443.
9393
1. (HTTP, HTTPS) An _NGINX worker_ sends traffic to and receives traffic from the _backends_.
9494

95+
### Differences with NGINX Plus
96+
97+
The previous diagram depicts NGINX Gateway Fabric using NGINX Open Source. NGINX Gateway Fabric with NGINX Plus has the following difference:
98+
99+
- An _admin_ can connect to the NGINX Plus API using port 8765. NGINX only allows connections from localhost.
100+
95101
## Pod readiness
96102

97103
The `nginx-gateway` container includes a readiness endpoint available through the path `/readyz`. A [readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes) periodically checks the endpoint on startup, returning a `200 OK` response when the pod can accept traffic for the data plane. Once the control plane successfully starts, the pod becomes ready.
76.4 KB
Loading

0 commit comments

Comments
 (0)