docs(go.d/nginx): improve prerequisites for NGINX collector (#20924)
* docs(go.d/nginx): improve prerequisites for NGINX collector * yamllint
Ilya Mashchenko committed
Sep 4, 2025 at 08:57 UTC
5846c8128acac0812249853a8f4e0b22ff489266
1 file changed
+38
src/go/plugin/go.d/collector/nginx/metadata.yaml
+38
@@ -64,6 +64,44 @@ modules:
64
- title: Enable status support
65
description: |
66
Configure [ngx_http_stub_status_module](https://nginx.org/en/docs/http/ngx_http_stub_status_module.html).
67
+
68
+ 1. Add a status location
69
+
70
+ Create a small server/location that only listens on localhost and exposes `/stub_status`:
71
+
72
+ **For local monitoring (default):**
73
+
74
+ ```nginx
75
+ # /etc/nginx/conf.d/stub_status.conf
76
+ server {
77
+ listen 127.0.0.1:80;
78
+ server_name localhost 127.0.0.1;
79
+
80
+ location = /stub_status {
81
+ stub_status; # exposes NGINX counters
82
+ access_log off; # keep logs clean
83
+ allow 127.0.0.1; # only local access
84
+ deny all;
85
+ }
86
+ }
87
+ ```
88
+
89
+ **For remote monitoring:**
90
+ - Change `listen` to bind to an accessible interface (e.g., `listen 80;`)
91
+ - Replace `allow 127.0.0.1;` with your Netdata collector's IP address
92
+ - Keep `deny all;` to block other IPs
93
+
94
+ 2. Reload NGINX and restart Netdata
95
+
96
+ ```bash
97
+ nginx -t
98
+ # if OK:
99
+ systemctl reload nginx # or: nginx -s reload
100
+
101
+ systemctl restart netdata
102
+ ```
103
+
104
+ After restart, Netdata will auto-detect the endpoint and begin collecting NGINX metrics.
105
configuration:
106
file:
107
name: go.d/nginx.conf