mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 04:58:50 +00:00
Converts docs for `_cat/segments`, `_cat/plugins` and `_cat/repositories` from `curl` to `// CONSOLE` so they are tested as part of the build and are cleaner to use in Console. They should work fine with `curl` with the `COPY AS CURL` link. Also swaps the `source` type of the response from `js` to `txt` because that is more correct. The syntax highlighter doesn't care. It looks at the text to figure out the language. So it looks a little funny for `_cat` responses regardless. Relates to #18160
26 lines
946 B
Plaintext
26 lines
946 B
Plaintext
[[cat-allocation]]
|
|
== cat allocation
|
|
|
|
`allocation` provides a snapshot of how many shards are allocated to each data node
|
|
and how much disk space they are using.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
GET /_cat/allocation?v
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
// TEST[s/^/PUT test\n{"settings": {"number_of_replicas": 0}}\n/]
|
|
|
|
Might respond with:
|
|
|
|
[source,txt]
|
|
--------------------------------------------------
|
|
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
|
|
5 260b 47.3gb 43.4gb 100.7gb 46 127.0.0.1 127.0.0.1 CSUXak2
|
|
--------------------------------------------------
|
|
// TESTRESPONSE[s/260b/\\d+b/ s/\d+(\.\d+)?[tgmk]?b/\\d+(\\.\\d+)?[tgmk]?b/ s/46/\\d+/]
|
|
// TESTRESPONSE[s/CSUXak2/.+/ _cat]
|
|
|
|
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.
|