nginx module for tsar
C
Switch branches/tags
Nothing to show
Latest commit d8fae59 Nov 16, 2012 @jinglong jinglong update readme
Permalink
Failed to load latest commit information.
README.md
mod_nginx.c update readme Nov 16, 2012

README.md

tsar-mod_nginx

#nginx/tengine module for tsar

Support read data from nginx by common socket or unix domain socket.

Quick start

  1. Install tsar.

  2. Generate a new module by using tsardevel.

    tsardevel ngx_mod

  3. Replace ngx_mod.c.

    make

    make install

  4. tsar --nginx

Configuration

  1. Default host is 127.0.0.1 and default port is 80. But we can change both (or one of) the host and port:

    ####example:

    export NGX_TSAR_HOST=192.168.0.1

    export NGX_TSAR_PORT=8080

  2. Stub Status module must be included,and add configuration as below:

    location = /nginx_status {

        stub_status on;
    

    }

  3. We can also using unix domain socket, if we set NGX_TSAR_HOST to a filesystem path:

    ####example:

    export NGX_TSAR_HOST=/tmp/nginx-tsar.sock

    nginx server(which includes the location /nginx_status) must also listen to the unix domain socket path

    listen unix:/tmp/nginx-tsar.sock;

  4. The uri and server name sent to the nginx server can alse be changed:

    ####example:

    export NGX_TSAR_SERVER_NAME=status.taobao.com

    export NGX_TSAR_URI=/nginx_status