Nginx status information of virtual hosts

I want to monitor each nginx virtual hosts(I have multiple nginx config for different domain) and found nginx module ngx_http_stub_status_module

But seems this module is for displaying server wide status not by per virtual hosts. Is there any solution to gather vhost stat information?


Solution 1:

You can try Nginx virtual host traffic status module however, it only works for compiled Nginx. Simply compile your nginx with this module and add the following directives to your vhosts or as per the documentation:

 location /status {
            vhost_traffic_status_display;
            vhost_traffic_status_display_format html;
        }

Hope it meet your needs.

Regards,

Kheshav