CentOS 8のNginxでサーバステータスの確認

Facebooktwittermail

CentOS 8のNginxでサーバステータスを確認する方法を設定してみました。
Apacheのmod_status的なものはNginxでは下記になるようです。

Module ngx_http_stub_status_module
http://nginx.org/en/docs/http/ngx_http_stub_status_module.html

--with-http_stub_status_moduleが有効になっていれば利用できます。

環境
・CentOS Linux release 8.2.2004 (Core)
・Kernel 4.18.0-193.6.3.el8_2.x86_64
・nginx version: nginx/1.18.0(Nginx Repository)

  1. パラメータの確認
  2. with-http_stub_status_moduleが表示されなかったら、どうする?

  3. 設定追加
  4. 別ファイルを作成して設定してみます。

    ちなみにバージョン1.7.5より以前のものと書き方が異なっています。

    In versions prior to 1.7.5, the directive syntax required an arbitrary argument, for example, “stub_status on”.

  5. Reload

http://IP_Address/Nginx_status にアクセスするとステータスが確認できます。
Apache mod_statusと比べると取得項目は少なくちょっと物足りなく感じますね。


Leave a Reply