项目作者: andreydomas

项目描述 :
Nginx SSL statistics module
高级语言: C
项目地址: git://github.com/andreydomas/ngx_http_ssl_status_module.git
创建时间: 2018-04-10T22:38:35Z
项目社区:https://github.com/andreydomas/ngx_http_ssl_status_module

开源协议:GNU General Public License v3.0

下载


ngx_http_ssl_status_module

Nginx SSL statistics module.

Each worker process appends its SSL statistics values to shared memory zone
from which this values can be viewed by HTTP-request.
It’s possible to collect independent statistics for a virtual server or assign
multiple virtual servers to one zone and get summed up values for them.

Building

The module can be build only as built-in module, not dynamic.
Add —add-module= to nginx configure script. Example:

  1. cd nginx-src
  2. ./configure --with-http_ssl_module --add-module=../ngx_http_ssl_status_module
  3. make

Usage

A server saves its SSL statistics to a zone defined by ssl_status_zone
(default: “default”) option.
Statistics can be accessed by a location marked by ssl_status option.
Example:

  1. server {
  2. server_name A;
  3. ...
  4. ssl_status_zone zone1;
  5. }
  6. server {
  7. server_name B;
  8. ...
  9. ssl_status_zone zone1;
  10. }
  11. server {
  12. server_name C;
  13. ...
  14. ssl_status_zone zone2;
  15. location /stat1 {
  16. ssl_status zone1;
  17. }
  18. location /stat2 {
  19. ssl_status zone2;
  20. }
  21. }
  • Statistics for servers A and B (with summed up counters) will be available at
    /stat1 of server C.
  • Statistics for server C will be available at /stat2 of server C.

Each field name corresponds apropriate statistics function name:
SSLCTX_sess*

  1. curl https://localhost/ssl_stat
  2. number: 0
  3. connect: 0
  4. connect_good: 0
  5. connect_renegotiate: 0
  6. accept: 21
  7. accept_good: 21
  8. accept_renegotiate: 0
  9. hits: 5
  10. cb_hits: 0
  11. misses: 0
  12. timeouts: 0
  13. cache_full: 0