Skip to content

Commit 9c820c3

Browse files
authored
Merge pull request #160 from nginx/status-modules
docs: add modules to usagestats
2 parents 3f66971 + cb1b6e8 commit 9c820c3

File tree

3 files changed

+51
-6
lines changed

3 files changed

+51
-6
lines changed

source/contents.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
configuration
1010
scripting
1111
certificates
12-
usagestats
12+
statusapi
1313
howto/index
1414
troubleshooting
1515
community

source/controlapi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ that comprises four primary options:
3636

3737
* - **/status**
3838
- Queried for
39-
:doc:`usage statistics <usagestats>`.
39+
:doc:`usage statistics <statusapi>`.
4040

4141

4242
.. _configuration-socket:

source/usagestats.rst renamed to source/statusapi.rst

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,23 @@
77
.. _configuration-stats:
88

99
****************
10-
Usage statistics
10+
Status API
1111
****************
1212

13-
Unit collects instance- and app-wide metrics,
14-
available via the **GET**-only **/status** section of the
15-
:ref:`control API <configuration-api>`:
13+
Unit collects information about the loaded language models, as well as
14+
instance- and app-wide metrics, and makes them available via the **GET**-only
15+
**/status** section of the :ref:`control API <configuration-api>`:
1616

1717
.. list-table::
1818
:header-rows: 1
1919

2020
* - Option
2121
- Description
2222

23+
* - **modules**
24+
- Object;
25+
lists currently loaded language modules.
26+
2327
* - **connections**
2428
- Object;
2529
lists per-instance connection statistics.
@@ -37,6 +41,24 @@ Example:
3741
.. code-block:: json
3842
3943
{
44+
"modules": {
45+
"python": [
46+
{
47+
"version": "3.12.3",
48+
"lib": "/opt/unit/modules/python.unit.so"
49+
},
50+
{
51+
"version": "3.8",
52+
"lib": "/opt/unit/modules/python-3.8.unit.so"
53+
}
54+
],
55+
56+
"php": {
57+
"version": "8.3.4",
58+
"lib": "/opt/unit/modules/php.unit.so"
59+
}
60+
},
61+
4062
"connections": {
4163
"accepted": 1067,
4264
"active": 13,
@@ -63,6 +85,29 @@ Example:
6385
}
6486
}
6587
88+
Each item in the **modules** object lists one of the currently loaded language
89+
modules, the installed version (or versions) of the module, and the path to the
90+
module file:
91+
92+
.. list-table::
93+
:header-rows: 1
94+
95+
* - Option
96+
- Description
97+
98+
* - **name**
99+
- String;
100+
language module name.
101+
102+
* - **version**
103+
- String;
104+
language module version. If multiple versions are loaded,
105+
the list contains multiple items.
106+
107+
* - **lib**
108+
- String;
109+
path to the language module file.
110+
66111
The **connections** object offers the following Unit instance metrics:
67112

68113
.. list-table::

0 commit comments

Comments
 (0)