Skip to content
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

Expose NGINX Plus dashboard #1488

Merged
merged 4 commits into from
Jan 22, 2024
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
15 changes: 15 additions & 0 deletions internal/mode/static/nginx/conf/nginx-plus.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ http {
sendfile on;
tcp_nopush on;

server {
listen 127.0.0.1:8765;
root /usr/share/nginx/html;
access_log off;

allow 127.0.0.1;
deny all;

location = /dashboard.html {}

location /api {
api write=off;
}
}

server {
listen unix:/var/run/nginx/nginx-plus-api.sock;
access_log off;
Expand Down
30 changes: 30 additions & 0 deletions site/content/how-to/monitoring/dashboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "NGINX Plus Dashboard"
description: "Learn how to view the NGINX Plus dashboard to see real-time metrics."
weight: 200
toc: true
docs: "DOCS-000"
---

{{<custom-styles>}}

## Overview

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.
pleshakov marked this conversation as resolved.
Show resolved Hide resolved

To access the dashboard:

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).

```shell
kubectl port-forward <nginx-gateway-fabric-pod> 8765:8765 -n nginx-gateway
```

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.

The dashboard will look like this:

{{<img src="img/nginx-plus-dashboard.png" alt="">}}


{{< 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 >}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Monitoring NGINX Gateway Fabric"
description: "Learn how to monitor your NGINX Gateway Fabric effectively. This guide provides easy steps for configuring monitoring settings and understanding key performance metrics."
title: "Prometheus Metrics"
description: "Learn how to monitor your NGINX Gateway Fabric effectively. This guide provides easy steps for configuring and understanding key performance metrics using Prometheus."
weight: 100
toc: true
docs: "DOCS-000"
Expand Down
2 changes: 1 addition & 1 deletion site/content/how-to/monitoring/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Troubleshooting"

weight: 200
weight: 300
toc: true
docs: "DOCS-000"
---
Expand Down
6 changes: 6 additions & 0 deletions site/content/overview/gateway-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ The following list describes the connections, preceeded by their types in parent
1. (HTTP, HTTPS) A _client_ sends traffic to and receives traffic from any of the _NGINX workers_ on ports 80 and 443.
1. (HTTP, HTTPS) An _NGINX worker_ sends traffic to and receives traffic from the _backends_.

### Differences with NGINX Plus

The previous diagram depicts NGINX Gateway Fabric using NGINX Open Source. NGINX Gateway Fabric with NGINX Plus has the following difference:

- An _admin_ can connect to the NGINX Plus API using port 8765. NGINX only allows connections from localhost.

## Pod readiness

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.
Expand Down
Binary file added site/static/img/nginx-plus-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading