2013-11-14 20:14:39 -05:00
|
|
|
[[cat-allocation]]
|
2014-05-16 15:43:35 -04:00
|
|
|
== cat allocation
|
2013-11-14 20:14:39 -05:00
|
|
|
|
2015-02-06 01:31:17 -05:00
|
|
|
`allocation` provides a snapshot of how many shards are allocated to each data node
|
|
|
|
and how much disk space they are using.
|
2013-11-14 20:14:39 -05:00
|
|
|
|
2016-10-06 13:31:18 -04:00
|
|
|
[source,js]
|
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
|
|
|
// CONSOLE
|
|
|
|
// TEST[s/^/PUT test\n{"settings": {"number_of_replicas": 0}}\n/]
|
|
|
|
|
|
|
|
Might respond with:
|
|
|
|
|
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+/]
|
2016-10-06 13:31:18 -04:00
|
|
|
// TESTRESPONSE[s/CSUXak2/.+/ _cat]
|
2013-11-14 20:14:39 -05:00
|
|
|
|
|
|
|
Here we can see that each node has been allocated a single shard and
|
|
|
|
that they're all using about the same amount of space.
|