# HG changeset patch # User Yaroslav Zhuravlev # Date 1692099386 -3600 # Node ID 6e094f91589656ac047fe6e6e32cec1b22f32091 # Parent 1f672755959a64aec3f0aeceab1dbdc13cb36414 Updated docs for the upcoming NGINX Plus release. diff --git a/xml/en/docs/http/ngx_http_api_module.xml b/xml/en/docs/http/ngx_http_api_module.xml --- a/xml/en/docs/http/ngx_http_api_module.xml +++ b/xml/en/docs/http/ngx_http_api_module.xml @@ -110,21 +110,22 @@ All API requests include a supported API version in the URI. Examples of API requests with this configuration: -http://127.0.0.1/api/8/ -http://127.0.0.1/api/8/nginx -http://127.0.0.1/api/8/connections -http://127.0.0.1/api/8/http/requests -http://127.0.0.1/api/8/http/server_zones/server_backend -http://127.0.0.1/api/8/http/caches/cache_backend -http://127.0.0.1/api/8/http/upstreams/backend -http://127.0.0.1/api/8/http/upstreams/backend/servers/ -http://127.0.0.1/api/8/http/upstreams/backend/servers/1 -http://127.0.0.1/api/8/http/keyvals/one?key=arg1 -http://127.0.0.1/api/8/stream/ -http://127.0.0.1/api/8/stream/server_zones/server_backend -http://127.0.0.1/api/8/stream/upstreams/ -http://127.0.0.1/api/8/stream/upstreams/backend -http://127.0.0.1/api/8/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/9/ +http://127.0.0.1/api/9/nginx +http://127.0.0.1/api/9/connections +http://127.0.0.1/api/9/workers +http://127.0.0.1/api/9/http/requests +http://127.0.0.1/api/9/http/server_zones/server_backend +http://127.0.0.1/api/9/http/caches/cache_backend +http://127.0.0.1/api/9/http/upstreams/backend +http://127.0.0.1/api/9/http/upstreams/backend/servers/ +http://127.0.0.1/api/9/http/upstreams/backend/servers/1 +http://127.0.0.1/api/9/http/keyvals/one?key=arg1 +http://127.0.0.1/api/9/stream/ +http://127.0.0.1/api/9/stream/server_zones/server_backend +http://127.0.0.1/api/9/stream/upstreams/ +http://127.0.0.1/api/9/stream/upstreams/backend +http://127.0.0.1/api/9/stream/upstreams/backend/servers/1 @@ -155,14 +156,14 @@ By default, the API is read-only. All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current API version is “8”. +The current API version is “9”. The optional “fields” argument in the request line specifies which fields of the requested objects will be output: -http://127.0.0.1/api/8/nginx?fields=version,build +http://127.0.0.1/api/9/nginx?fields=version,build @@ -208,6 +209,11 @@ redirect happens during request p +The /workers/ data +were added in version 9. + + + Detailed failure counters were added to SSL statistics in version 8 (1.23.2). @@ -2009,6 +2015,99 @@ Possible responses: + +/workers/ + + +Supported methods: + + +GET - Return statistics for all worker processes +Returns statistics for all worker processes such as accepted, dropped, active, idle connections, total and current requests. + +Request parameters: + +fields +(string, optional) + +Limits which fields of worker process statistics will be output. + + + +Possible responses: + + +200 - Success, returns a collection of "Worker process" objects for all workers +404 - Worker not found (WorkerNotFound), +unknown version (UnknownVersion), returns Error + + + +DELETE - Reset statistics for all worker processes. +Resets statistics for all worker processes such as +accepted, dropped, active, idle connections, total and current requests. + +Possible responses: + + +204 - Success +404 - Worker not found (WorkerNotFound), +unknown version (UnknownVersion), returns Error +405 - Method disabled (MethodDisabled), returns Error + + + + + +/workers/{workerId} + + +Parameters common for all methods: + +workerId +(string, required) + +The ID of the worker process. + +Supported methods: + + +GET - Return status of a worker process +Returns status of a particular worker process. + +Request parameters: + +fields +(string, optional) + +Limits which fields of worker process statistics will be output. + + + +Possible responses: + + +200 - Success, returns Worker process +404 - Worker not found (WorkerNotFound), +unknown version (UnknownVersion), returns Error + + + +DELETE - Reset statistics for a worker process. +Resets statistics of accepted, dropped, active, idle connections, +as well as total and current requests. + +Possible responses: + + +204 - Success +404 - Worker not found (WorkerNotFound), +unknown version (UnknownVersion), returns Error +405 - Method disabled (MethodDisabled), returns Error + + + + @@ -4346,6 +4445,100 @@ The total number of requests completed w } } + +Worker process: +Statistics per each worker process. + +id (integer) + + +The ID of the worker process. + + +pid (integer) + + +The PID identifier of the worker process used by the operating system. + + +connections + +The number of accepted, dropped, active, and idle connections +per worker process. + +accepted (integer) + + +The total number of client connections +accepted by the worker process. + + +dropped (integer) + + +The total number of client connections +dropped by the worker process. + + +active (integer) + + +The current number of active client connections +that are currently being handled by the worker process. + + +idle (integer) + + +The number of idle client connections +that are currently being handled by the worker process. + + + + +http + + + +requests + +The total number of client requests handled by the worker process. + +total (integer) + + +The total number of client requests received by the worker process. + + +current (integer) + + +The current number of client requests that are currently being processed by the worker process. + + + + + + +Example: + +{ + "id" : 0, + "pid" : 32212, + "connections" : { + "accepted" : 1, + "dropped" : 0, + "active" : 1, + "idle" : 0 + }, + "http" : { + "requests" : { + "total" : 15, + "current" : 1 + } + } +} + Error: nginx error object. diff --git a/xml/en/docs/http/ngx_http_api_module_head.xml b/xml/en/docs/http/ngx_http_api_module_head.xml --- a/xml/en/docs/http/ngx_http_api_module_head.xml +++ b/xml/en/docs/http/ngx_http_api_module_head.xml @@ -110,21 +110,22 @@ All API requests include a supported API version in the URI. Examples of API requests with this configuration: -http://127.0.0.1/api/8/ -http://127.0.0.1/api/8/nginx -http://127.0.0.1/api/8/connections -http://127.0.0.1/api/8/http/requests -http://127.0.0.1/api/8/http/server_zones/server_backend -http://127.0.0.1/api/8/http/caches/cache_backend -http://127.0.0.1/api/8/http/upstreams/backend -http://127.0.0.1/api/8/http/upstreams/backend/servers/ -http://127.0.0.1/api/8/http/upstreams/backend/servers/1 -http://127.0.0.1/api/8/http/keyvals/one?key=arg1 -http://127.0.0.1/api/8/stream/ -http://127.0.0.1/api/8/stream/server_zones/server_backend -http://127.0.0.1/api/8/stream/upstreams/ -http://127.0.0.1/api/8/stream/upstreams/backend -http://127.0.0.1/api/8/stream/upstreams/backend/servers/1 +http://127.0.0.1/api/9/ +http://127.0.0.1/api/9/nginx +http://127.0.0.1/api/9/connections +http://127.0.0.1/api/9/workers +http://127.0.0.1/api/9/http/requests +http://127.0.0.1/api/9/http/server_zones/server_backend +http://127.0.0.1/api/9/http/caches/cache_backend +http://127.0.0.1/api/9/http/upstreams/backend +http://127.0.0.1/api/9/http/upstreams/backend/servers/ +http://127.0.0.1/api/9/http/upstreams/backend/servers/1 +http://127.0.0.1/api/9/http/keyvals/one?key=arg1 +http://127.0.0.1/api/9/stream/ +http://127.0.0.1/api/9/stream/server_zones/server_backend +http://127.0.0.1/api/9/stream/upstreams/ +http://127.0.0.1/api/9/stream/upstreams/backend +http://127.0.0.1/api/9/stream/upstreams/backend/servers/1 @@ -155,14 +156,14 @@ By default, the API is read-only. All API requests should contain a supported API version in the URI. If the request URI equals the location prefix, the list of supported API versions is returned. -The current API version is “8”. +The current API version is “9”. The optional “fields” argument in the request line specifies which fields of the requested objects will be output: -http://127.0.0.1/api/8/nginx?fields=version,build +http://127.0.0.1/api/9/nginx?fields=version,build @@ -208,6 +209,11 @@ redirect happens during request p +The /workers/ data +were added in version 9. + + + Detailed failure counters were added to SSL statistics in version 8 (1.23.2). diff --git a/xml/en/docs/stream/ngx_stream_mqtt_filter_module.xml b/xml/en/docs/stream/ngx_stream_mqtt_filter_module.xml --- a/xml/en/docs/stream/ngx_stream_mqtt_filter_module.xml +++ b/xml/en/docs/stream/ngx_stream_mqtt_filter_module.xml @@ -62,12 +62,37 @@ Enables the MQTT protocol for the given + + +number size +100 1k +stream +server +1.25.1 + + +Sets the number and size of the buffers +used for handling MQTT messages, +for a single connection. + + + + + size 4k|8k server + +This directive is obsolete since version 1.25.1. +The +directive should be used instead. + + + + Sets the size of the buffer used for writing a modified message. By default, the buffer size is equal to one memory page. @@ -77,6 +102,7 @@ It can be made smaller, however. + field value diff --git a/xml/ru/docs/stream/ngx_stream_mqtt_filter_module.xml b/xml/ru/docs/stream/ngx_stream_mqtt_filter_module.xml --- a/xml/ru/docs/stream/ngx_stream_mqtt_filter_module.xml +++ b/xml/ru/docs/stream/ngx_stream_mqtt_filter_module.xml @@ -63,12 +63,37 @@ mqtt_set_connect username "$name"; + + +число размер +100 1k +stream +server +1.25.1 + + +Задаёт число и размер буферов, +необходимых для обработки MQTT-сообщений, +для одного соединения. + + + + + размер 4k|8k server + +Эта директива устарела начиная с версии 1.25.1. +Вместо неё следует использовать директиву +. + + + + Задаёт размер буфера, в который будет записываться модифицированное сообщение. По умолчанию размер одного буфера равен размеру страницы памяти. @@ -78,6 +103,7 @@ mqtt_set_connect username "$name"; + поле значение diff --git a/yaml/nginx_api.yaml b/yaml/nginx_api.yaml --- a/yaml/nginx_api.yaml +++ b/yaml/nginx_api.yaml @@ -1,6 +1,6 @@ swagger: '2.0' info: - version: '8.0' + version: '9.0' title: NGINX Plus REST API description: NGINX Plus REST [API](https://nginx.org/en/docs/http/ngx_http_api_module.html) @@ -9,11 +9,12 @@ info: key-value pairs management for [http](https://nginx.org/en/docs/http/ngx_http_keyval_module.html) and [stream](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html). -basePath: /api/8 +basePath: /api/9 tags: - name: General Info - name: Processes - name: Connections + - name: Workers - name: Slabs - name: Resolvers - name: SSL @@ -2101,6 +2102,112 @@ paths: description: Method disabled (*MethodDisabled*) schema: $ref: '#/definitions/NginxError' + /workers/: + get: + tags: + - Workers + - Method GET + summary: Return statistics for all worker processes + description: Returns statistics for all worker processes such as accepted, dropped, active, idle connections, total and current requests. + operationId: getWorkers + produces: + - application/json + parameters: + - in: query + name: fields + type: string + description: Limits which fields of worker process statistics will be output. + responses: + '200': + description: Success + schema: + $ref: '#/definitions/NginxWorkersMap' + '404': + description: | + Worker not found (*WorkerNotFound*), + unknown version (*UnknownVersion*) + schema: + $ref: '#/definitions/NginxError' + delete: + tags: + - Workers + - Method DELETE + summary: Reset statistics for all worker processes. + description: | + Resets statistics for all worker processes such as + accepted, dropped, active, idle connections, total and current requests. + operationId: deleteWorkersStat + produces: + - application/json + responses: + '204': + description: Success + '404': + description: | + Worker not found (*WorkerNotFound*), + unknown version (*UnknownVersion*) + schema: + $ref: '#/definitions/NginxError' + '405': + description: Method disabled (*MethodDisabled*) + schema: + $ref: '#/definitions/NginxError' + '/workers/{workerId}': + parameters: + - name: workerId + in: path + description: The ID of the worker process. + required: true + type: string + get: + tags: + - Workers + - Method GET + summary: Return status of a worker process + description: Returns status of a particular worker process. + operationId: getWorker + produces: + - application/json + parameters: + - in: query + name: fields + type: string + description: Limits which fields of worker process statistics will be output. + responses: + '200': + description: Success + schema: + $ref: '#/definitions/NginxWorker' + '404': + description: | + Worker not found (*WorkerNotFound*), + unknown version (*UnknownVersion*) + schema: + $ref: '#/definitions/NginxError' + delete: + tags: + - Workers + - Method DELETE + summary: Reset statistics for a worker process. + description: | + Resets statistics of accepted, dropped, active, idle connections, + as well as total and current requests. + operationId: deleteWorkerStat + produces: + - application/json + responses: + '204': + description: Success + '404': + description: | + Worker not found (*WorkerNotFound*), + unknown version (*UnknownVersion*) + schema: + $ref: '#/definitions/NginxError' + '405': + description: Method disabled (*MethodDisabled*) + schema: + $ref: '#/definitions/NginxError' ### ###DEFINITIONS ### @@ -4622,6 +4729,97 @@ definitions: refused: 0 timedout: 243 unknown: 478 + NginxWorker: + title: Worker process + description: | + Statistics per each worker process. + properties: + id: + type: integer + description: The ID of the worker process. + pid: + type: integer + description: The PID identifier of the worker process used by the operating system. + connections: + type: object + description: | + The number of accepted, dropped, active, and idle connections + per worker process. + properties: + accepted: + type: integer + description: | + The total number of client connections + accepted by the worker process. + dropped: + type: integer + description: | + The total number of client connections + dropped by the worker process. + active: + type: integer + description: | + The current number of active client connections + that are currently being handled by the worker process. + idle: + type: integer + description: | + The number of idle client connections + that are currently being handled by the worker process. + http: + type: object + properties: + requests: + type: object + description: The total number of client requests handled by the worker process. + properties: + total: + type: integer + description: The total number of client requests received by the worker process. + current: + type: integer + description: The current number of client requests that are currently being processed by the worker process. + example: + id: 0 + pid: 32212 + connections: + accepted: 1 + dropped: 0 + active: 1 + idle: 0 + http: + requests: + total: 15 + current: 1 + NginxWorkersMap: + title: Worker processes + description: nginx worker processes object. + type: object + additionalProperties: + $ref: '#/definitions/NginxWorker' + example: + - id: 0 + pid: 32212 + connections: + accepted: 1 + dropped: 0 + active: 1 + idle: 0 + http: + requests: + total: 19 + current: 1 + - id: 1 + pid: 32214 + connections: + accepted: 1 + dropped: 0 + active: 1 + idle: 0 + http: + requests: + total: 15 + current: 0 NginxError: title: Error description: |