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

Feature request - enable NGINX stub_status for monitoring #1127

Open
Zablove opened this issue Jan 22, 2024 · 0 comments
Open

Feature request - enable NGINX stub_status for monitoring #1127

Zablove opened this issue Jan 22, 2024 · 0 comments

Comments

@Zablove
Copy link

Zablove commented Jan 22, 2024

Zabbix provide a NGINX template to provide NGINX monitoring. This template however requires the stub_status module to be enabled. https://www.zabbix.com/integrations/nginx

My suggestion would be to enable this by default at IP 127.0.0.1 and create a variable so that you will be able to change the source IP because the checks will not be performed by an agent installed at the container.

NGINX suggests the stub_status page not to publish to everyone: https://www.nginx.com/blog/avoiding-top-10-nginx-configuration-mistakes/

Probably also a good idea to restrict access to the current status and ping pages.

Current config:

    location ~ ^/(status|ping)$ {
        access_log off;
        fastcgi_pass   unix:/tmp/php-fpm.sock;

        fastcgi_param  SCRIPT_FILENAME  $webroot$fastcgi_script_name;
        include fastcgi_params;
    }

Suggestions:
Status and ping page:

    location ~ ^/(status|ping)$ {
        access_log off;
        allow 127.0.0.1; #<variable
        fastcgi_pass   unix:/tmp/php-fpm.sock;

        fastcgi_param  SCRIPT_FILENAME  $webroot$fastcgi_script_name;
        include fastcgi_params;
    }

Basic_status page:

location = /basic_status {
        stub_status;
        allow 127.0.0.1; #<variable
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant