NGINX Unit
v. 1.29.0

Usage Statistics§

Unit collects instance- and app-wide metrics, available via the GET-only /status section of the control API:

Option Description
connections Object; lists per-instance connection statistics.
requests Object; lists per-instance request statistics.
applications Object; each option item lists per-app process and request statistics.

Example:

{
    "connections": {
        "accepted": 1067,
        "active": 13,
        "idle": 4,
        "closed": 1050
    },

    "requests": {
        "total": 1307
    },

    "applications": {
        "wp": {
            "processes": {
                "running": 14,
                "starting": 0,
                "idle": 4
            },

            "requests": {
                "active": 10
            }
        }
    }
}

The connections object offers the following Unit instance metrics:

Option Description
accepted Integer; total accepted connections during the instance’s lifetime.
active Integer; current active connections for the instance.
idle Integer; current idle connections for the instance.
closed Integer; total closed connections during the instance’s lifetime.

Example:

"connections": {
    "accepted": 1067,
    "active": 13,
    "idle": 4,
    "closed": 1050
}

Note

For details of instance connection management, refer to Settings.

The requests object currently exposes a single instance-wide metric:

Option Description
total Integer; total non-API requests during the instance’s lifetime.

Example:

"requests": {
    "total": 1307
}

Each item in applications describes an app currently listed in the /config/applications section:

Option Description
processes Object; lists per-app process statistics.
requests Object; similar to /status/requests, but includes only the data for a specific app.

Example:

"applications": {
    "wp": {
        "processes": {
            "running": 14,
            "starting": 0,
            "idle": 4
        },

        "requests": {
            "active": 10
        }
    }
}

The processes object exposes the following per-app metrics:

Option Description
running Integer; current running app processes.
starting Integer; current starting app processes.
idle Integer; current idle app processes.

Example:

"processes": {
    "running": 14,
    "starting": 0,
    "idle": 4
}

Note

For details of per-app process management, refer to Process Management.