Retrieve Node Status
GET {{gateway}}/status
Retrieve Node Status konghq
- Retrieve usage information about a node, with some basic information about the connections being processed by the underlying nginx process, the status of the database connection, and node’s memory usage.
If you want to monitor the Kong process, since Kong is built on top of nginx, every existing nginx monitoring tool or agent can be used.
memory: Metrics about the memory usage.
- workersluavms: An array with all workers of the Kong node, where each entry contains:
- httpallocatedgc: HTTP submodule’s Lua virtual machine’s memory usage information, as reported by collectgarbage(
count
), for every active worker, i.e. a worker that received a proxy call in the last 10 seconds. - pid: worker’s process identification number. luashareddicts: An array of information about dictionaries that are shared with all workers in a Kong node, where each array node contains how much memory is dedicated for the specific shared dictionary (capacity) and how much of said memory is in use (allocatedslabs). These shared dictionaries have least recent used (LRU) eviction capabilities, so a full dictionary, where allocatedslabs == capacity, will work properly. However for some dictionaries, e.g. cache HIT/MISS shared dictionaries, increasing their size can be beneficial for the overall performance of a Kong node.
- The memory usage unit and precision can be changed using the querystring arguments unit and scale:
- unit: one of b/B, k/K, m/M, g/G, which will return results in bytes, kibibytes, mebibytes, or gibibytes, respectively. When “bytes” are requested, the memory values in the response will have a number type instead of string. Defaults to m.
- scale: the number of digits to the right of the decimal points when values are given in human-readable memory strings (unit other than “bytes”). Defaults to 2. You can get the shared dictionaries memory usage in kibibytes with 4 digits of precision by doing: GET /status?unit=k&scale=4
server: Metrics about the nginx HTTP/S server.
- total_requests: The total number of client requests.
- connections_active: The current number of active client connections including Waiting connections.
- connections_accepted: The total number of accepted client connections.
- connections_handled: The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached.
- connections_reading: The current number of connections where Kong is reading the request header.
- connections_writing: The current number of connections where nginx is writing the response back to the client.
- connections_waiting: The current number of idle client connections waiting for a request.
database: Metrics about the database.
- reachable: A boolean value reflecting the state of the database connection. Please note that this flag does not reflect the health of the database itself.
RESPONSES
status: OK
{"database":{"reachable":true},"memory":{"workers_lua_vms":[{"http_allocated_gc":"0.03 MiB","pid":22},{"http_allocated_gc":"0.03 MiB","pid":23}],"lua_shared_dicts":{"kong_locks":{"allocated_slabs":"0.06 MiB","capacity":"8.00 MiB"},"kong":{"allocated_slabs":"0.04 MiB","capacity":"5.00 MiB"},"kong_process_events":{"allocated_slabs":"0.04 MiB","capacity":"5.00 MiB"},"kong_db_cache_miss":{"allocated_slabs":"0.08 MiB","capacity":"12.00 MiB"},"kong_healthchecks":{"allocated_slabs":"0.04 MiB","capacity":"5.00 MiB"},"kong_cluster_events":{"allocated_slabs":"0.04 MiB","capacity":"5.00 MiB"},"kong_core_db_cache_miss":{"allocated_slabs":"0.08 MiB","capacity":"12.00 MiB"},"kong_core_db_cache":{"allocated_slabs":"0.77 MiB","capacity":"128.00 MiB"},"prometheus_metrics":{"allocated_slabs":"0.04 MiB","capacity":"5.00 MiB"},"kong_db_cache":{"allocated_slabs":"0.76 MiB","capacity":"128.00 MiB"},"kong_rate_limiting_counters":{"allocated_slabs":"0.08 MiB","capacity":"12.00 MiB"}}},"server":{"connections_writing":1,"total_requests":21,"connections_handled":15,"connections_accepted":15,"connections_reading":0,"connections_active":4,"connections_waiting":3}}