From 31f97a4cef75e569d767fe0b9ce8dbb7eda4bb11 Mon Sep 17 00:00:00 2001 From: Spencer Ugbo Date: Wed, 3 Dec 2025 10:23:29 +0000 Subject: [PATCH 1/2] docs: add access log metrics setup details to Agent docs --- .../configure-agent-features.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/nginx-one-console/agent/configure-instances/configure-agent-features.md b/content/nginx-one-console/agent/configure-instances/configure-agent-features.md index 29708c6a2..9b09e36ea 100644 --- a/content/nginx-one-console/agent/configure-instances/configure-agent-features.md +++ b/content/nginx-one-console/agent/configure-instances/configure-agent-features.md @@ -22,6 +22,7 @@ Before you start, make sure that you have: The following table lists the NGINX Agent features: {{< table "features" >}} + | Feature Name | Description | Default | | ------------------- | --------------------------------------------------------------------------- | ------- | | configuration | Full read/write management of configurations, controlled by DataPlaneConfig ConfigMode. | On | @@ -29,6 +30,7 @@ The following table lists the NGINX Agent features: | file-watcher | Monitoring of file changes in the allowed directories list and references from product configs. | On | | metrics | Full metrics reporting. | On | logs-nap | F5 WAF for NGINX logs. | On | + {{< /table >}} ## Configuration sources @@ -87,3 +89,16 @@ Define features in the `nginx-agent.conf` file: Once the steps have been completed, users will be able to view metrics data being sent but will not have the capability to push NGINX configuration changes. +{{}} For collecting metrics from NGINX access logs, ensure that following log format is used in the NGINX configuration: + +```nginx +log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for" ' + '"$bytes_sent" "$request_length" "$request_time" ' + '"$gzip_ratio" $server_protocol '; + +access_log /var/log/nginx/access.log main; +``` + +{{}} From c2c9bce934ca21a1ce027aaad166976d7d67350e Mon Sep 17 00:00:00 2001 From: Spencer Ugbo Date: Wed, 3 Dec 2025 17:27:31 +0000 Subject: [PATCH 2/2] docs: move doc changes to metrics page --- .../monitoring/enable-nginx-oss-stub-status.md | 16 +++++++++++++++- .../configure-agent-features.md | 14 -------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/content/includes/use-cases/monitoring/enable-nginx-oss-stub-status.md b/content/includes/use-cases/monitoring/enable-nginx-oss-stub-status.md index 3b137a8ff..6734cdd3e 100644 --- a/content/includes/use-cases/monitoring/enable-nginx-oss-stub-status.md +++ b/content/includes/use-cases/monitoring/enable-nginx-oss-stub-status.md @@ -26,4 +26,18 @@ This configuration: - Allows requests only from `127.0.0.1` (localhost). - Blocks all other requests for security. -For more details, see the [NGINX Stub Status module documentation](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html). \ No newline at end of file +For more details, see the [NGINX Stub Status module documentation](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html). + +{{}} For collecting metrics from NGINX Open Source, ensure that following log format is used in the NGINX configuration: + +```nginx +log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for" ' + '"$bytes_sent" "$request_length" "$request_time" ' + '"$gzip_ratio" $server_protocol '; + +access_log /var/log/nginx/access.log main; +``` + +{{}} \ No newline at end of file diff --git a/content/nginx-one-console/agent/configure-instances/configure-agent-features.md b/content/nginx-one-console/agent/configure-instances/configure-agent-features.md index 9b09e36ea..a06973ba6 100644 --- a/content/nginx-one-console/agent/configure-instances/configure-agent-features.md +++ b/content/nginx-one-console/agent/configure-instances/configure-agent-features.md @@ -88,17 +88,3 @@ Define features in the `nginx-agent.conf` file: `sudo systemctl restart nginx-agent` Once the steps have been completed, users will be able to view metrics data being sent but will not have the capability to push NGINX configuration changes. - -{{}} For collecting metrics from NGINX access logs, ensure that following log format is used in the NGINX configuration: - -```nginx -log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" ' - '"$bytes_sent" "$request_length" "$request_time" ' - '"$gzip_ratio" $server_protocol '; - -access_log /var/log/nginx/access.log main; -``` - -{{}}