O'Reilly logo

Nginx Troubleshooting by Alex Kapranoff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting statistics from http_stub_status

Nginx base distribution contains a simple module that provides access to several rather basic but useful counters inside Nginx that are very important to monitor on a regular basis. The module is named ngx_http_stub_status, and we will describe how to use it in monitoring.

This module is not compiled by default. To check if your Nginx distribution is compiled with the stub_status module, you can use this command:

$ nginx -V 2>&1 | fgrep -c http_stub_status_module
1
$

If you see 1, then this module is compiled and linked to your Nginx binary. Otherwise, you need to compile it using --with-http_stub_status_module parameter to configure script that is invoked during Nginx compilation.

Once you have this module ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required