2013-11-14 20:14:39 -05:00
|
|
|
[[cat-allocation]]
|
2019-08-13 08:35:08 -04:00
|
|
|
=== cat allocation API
|
|
|
|
++++
|
|
|
|
<titleabbrev>cat allocation</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
2013-11-14 20:14:39 -05:00
|
|
|
|
2019-08-05 11:17:37 -04:00
|
|
|
Provides a snapshot of the number of shards allocated to each data node
|
|
|
|
and their disk space.
|
|
|
|
|
|
|
|
|
|
|
|
[[cat-allocation-api-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
2019-08-23 10:57:20 -04:00
|
|
|
`GET /_cat/allocation/<node_id>`
|
2019-08-05 11:17:37 -04:00
|
|
|
|
|
|
|
[[cat-allocation-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=node-id]
|
|
|
|
|
|
|
|
[[cat-allocation-api-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=bytes]
|
|
|
|
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=http-format]
|
|
|
|
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=local]
|
|
|
|
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
|
|
|
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-h]
|
|
|
|
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=help]
|
|
|
|
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-s]
|
|
|
|
|
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-v]
|
|
|
|
|
|
|
|
[[cat-allocation-api-example]]
|
|
|
|
==== {api-examples-title}
|
2013-11-14 20:14:39 -05:00
|
|
|
|
2019-09-09 13:38:14 -04:00
|
|
|
[source,console]
|
2013-11-14 20:14:39 -05:00
|
|
|
--------------------------------------------------
|
2016-10-06 13:31:18 -04:00
|
|
|
GET /_cat/allocation?v
|
2013-11-14 20:14:39 -05:00
|
|
|
--------------------------------------------------
|
2016-10-06 13:31:18 -04:00
|
|
|
// TEST[s/^/PUT test\n{"settings": {"number_of_replicas": 0}}\n/]
|
|
|
|
|
2019-08-05 11:17:37 -04:00
|
|
|
The API returns the following response:
|
2016-10-06 13:31:18 -04:00
|
|
|
|
2016-10-25 10:56:30 -04:00
|
|
|
[source,txt]
|
2016-10-06 13:31:18 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
|
2018-05-14 12:22:35 -04:00
|
|
|
1 260b 47.3gb 43.4gb 100.7gb 46 127.0.0.1 127.0.0.1 CSUXak2
|
2016-10-06 13:31:18 -04:00
|
|
|
--------------------------------------------------
|
2017-09-18 04:46:02 -04:00
|
|
|
// TESTRESPONSE[s/\d+(\.\d+)?[tgmk]?b/\\d+(\\.\\d+)?[tgmk]?b/ s/46/\\d+/]
|
2019-06-10 09:33:32 -04:00
|
|
|
// TESTRESPONSE[s/CSUXak2/.+/ non_json]
|
2013-11-14 20:14:39 -05:00
|
|
|
|
2019-08-05 11:17:37 -04:00
|
|
|
This response shows a single shard is allocated to the one node available.
|