{
  "id": "last",
  "title": "Latest node stats requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/nodes/stats/last/",
  "summary": "Most recent node statistics requests",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-all-nodes-stats-last) | `/v1/nodes/stats/last` | Get latest stats for all nodes |\n| [GET](#get-node-stats-last) | `/v1/nodes/stats/last/{uid}` | Get latest stats for a single node |\n\n## Get latest stats for all nodes {#get-all-nodes-stats-last}\n\n```sh\nGET /v1/nodes/stats/last\n```\n\nGet latest statistics for all nodes.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [view_all_nodes_stats]() |\n\n### Request {#get-all-request}\n\n#### Example HTTP request\n\n```sh\nGET /v1/nodes/stats/last?interval=1sec\u0026stime=2015-10-14T06:29:43Z\n```\n\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n\n#### Query parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec. (optional) |\n| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) |\n| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601) format (optional) |\n\n### Response {#get-all-response}\n\nReturns most recent [statistics]() for all nodes.\n\n#### Example JSON body\n\n```json\n{\n    \"1\": {\n         \"conns\": 0.0,\n         \"cpu_idle\": 0.922500000015134,\n         \"cpu_system\": 0.007499999999708962,\n         \"cpu_user\": 0.01749999999810825,\n         \"cur_aof_rewrites\": 0.0,\n         \"egress_bytes\": 7887.0,\n         \"ephemeral_storage_avail\": 75821363200.0,\n         \"ephemeral_storage_free\": 81189969920.0,\n         \"etime\": \"2015-10-14T06:29:44Z\",\n         \"free_memory\": 2956963840.0,\n         \"ingress_bytes\": 4950.0,\n         \"interval\": \"1sec\",\n         \"persistent_storage_avail\": 75821363200.0,\n         \"persistent_storage_free\": 81189969920.0,\n         \"stime\": \"2015-10-14T06:29:43Z\",\n         \"total_req\": 0.0\n     },\n     \"2\": {\n         \"conns\": 0.0,\n         \"cpu_idle\": 0.922500000015134,\n         \"// additional fields...\"\n     }\n}\n```\n\n### Status codes {#get-all-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | No nodes exist |\n\n## Get latest node stats {#get-node-stats-last}\n\n```sh\nGET /v1/nodes/stats/last/{int: uid}\n```\n\nGet the latest statistics of a node.\n\n#### Required permissions\n\n| Permission name |\n|-----------------|\n| [view_node_stats]() |\n\n### Request {#get-request}\n\n#### Example HTTP request\n\n```sh\nGET /v1/nodes/stats/last/1?interval=1sec\u0026stime=2015-10-13T09:01:54Z\n```\n\n\n#### Request headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The unique ID of the node requested. |\n\n\n#### Query parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| interval | string | Time interval for which we want stats: 1sec/10sec/5min/15min/1hour/12hour/1week. Default: 1sec. (optional) |\n| stime | ISO_8601 | Start time from which we want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601)format (optional) |\n| etime | ISO_8601 | End time after which we don't want the stats. Should comply with the [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601)format (optional) |\n\n### Response {#get-response}\n\nReturns the most recent [statistics]() for the specified node.\n\n#### Example JSON body\n\n```json\n{\n    \"1\": {\n         \"conns\": 0.0,\n         \"cpu_idle\": 0.8049999999930151,\n         \"cpu_system\": 0.02750000000014552,\n         \"cpu_user\": 0.12000000000080036,\n         \"cur_aof_rewrites\": 0.0,\n         \"egress_bytes\": 2169.0,\n         \"ephemeral_storage_avail\": 75920293888.0,\n         \"ephemeral_storage_free\": 81288900608.0,\n         \"etime\": \"2015-10-13T09:01:55Z\",\n         \"free_memory\": 3285381120.0,\n         \"ingress_bytes\": 3020.0,\n         \"interval\": \"1sec\",\n         \"persistent_storage_avail\": 75920293888.0,\n         \"persistent_storage_free\": 81288900608.0,\n         \"stime\": \"2015-10-13T09:01:54Z\",\n         \"total_req\": 0.0\n    }\n}\n```\n\n### Error codes {#get-error-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | No error |\n| [404 Not Found](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5) | Node does not exist |\n| [406 Not Acceptable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7) | Node isn't currently active |\n| [503 Service Unavailable](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) | Mode is in recovery state |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00"
}

