Archive > 22.7 Legacy Series

NGINX Stub_Status?

(1/2) > >>

itngo:
Hi,

is NGINX-Plugin STUB_STATUS Page enabled?
Want to monitor NGINX with ZABBIX, but unsure what to enable or configure in NGINX to get the Status-Page working.
Even no idea if it is already and where it might already listening?

Fright:
Hi
yes, nginx built with --with-http_stub_status_module
can add location for status page and add stub_status; directive via _post hook

itngo:
Hi,

thank you for your reply.
Can you get a bit more in detail about the _post hook.
What exactly should the file look like?

Fright:
Hi!
for example, you can add server listening on 127.0.0.1 (say 127.0.0.1:88 with "name" 127.0.0.1)
then add a location with a "/nginx_status" url pattern and link it to "127.0.0.1" Server
Hit Apply to reload templates.
go to /usr/local/etc/nginx dir and read nginx.conf file:
in the "location  /nginx_status" block you will see something like:


--- Code: ---location  /nginx_status {
    BasicRule wl:19;
    DeniedUrl "/waf_denied.html";
    autoindex off;
    http2_push_preload off;
    include 03052a05-896e-4c6c-a6f6-680d6ae590fa_post/*.conf;
}

--- End code ---

create "03052a05-896e-4c6c-a6f6-680d6ae590fa_post" dir inside /usr/local/etc/nginx/ dir and add status.conf file to this dir with one line:

--- Code: ---        stub_status on;
--- End code ---

Hit Apply button on Services: Nginx: Configuration to re-apply config and try

--- Quote --- curl http://127.0.0.1:88/nginx_status
--- End quote ---


fabian:
The plugin uses VTS for a more detailed status page. It is already available via a Unix socket.

Navigation

[0] Message Index

[#] Next page

Go to full version