Skip to content

NGINX status module for connection/request and upstream status, which is returned in JSON format

Notifications You must be signed in to change notification settings

nginx-modules/ngx_http_json_status_module

 
 

Repository files navigation

ngx_http_json_status_module

Specification

NGINX status module for connection/request and upstream status, which is returned in JSON format.

Directives

syntax:	 status;
default: none;
context: location

response

  • Meaning of each element Here, want to see also
{
    "version": "1",
    "nginx_version": "1.5.3",
    "address": "127.0.0.1",
    "timestamp": 1377263206961,
    "connections": {
        "accepted": 80399,
        "dropped": 0,
        "active": 1,
        "idle": 1
    },
    "requests": {
        "total": 80399,
        "current": 1
    },
    "upstreams":{
        "upstream_servers": [
            {
                "server": "127.0.0.1:1081",
                "state": "up",
                "weight": 1,
                "backup": false,
                "active": 0,
                "keepalive": 0,
                "requests": 470,
                "fails": 0,
                "unavail": 0,
                "downstart": 0,
                "sent": 78020,
                "received": 2350,
                "downtime": 0,
                "responses": {
                    "1xx": 0,
                    "2xx": 470,
                    "3xx": 0,
                    "4xx": 0,
                    "5xx": 0,
                    "total": 470
                },
                "health_checks": {
                    "checks": 0,
                    "fails": 0,
                    "unhealthy": 0
                }
            },
        ...
        ],
    }
}

Built-in

./configure --add-module=./ngx_http_json_status_module

Setting Example

server {
  ...
  location = /status {
    status;
  }
}

Reference

About

NGINX status module for connection/request and upstream status, which is returned in JSON format

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 100.0%