Skip to content

Commit

Permalink
[DOCS] Reformats cluster stats API and expands common params (elasti…
Browse files Browse the repository at this point in the history
…c#45270)

Co-Authored-By: James Rodewig <[email protected]>
  • Loading branch information
szabosteve and jrodewig authored Aug 7, 2019
1 parent 048dfeb commit 3830e53
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
44 changes: 39 additions & 5 deletions docs/reference/cluster/stats.asciidoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,43 @@
[[cluster-stats]]
=== Cluster Stats

The Cluster Stats API allows to retrieve statistics from a cluster wide perspective.
The API returns basic index metrics (shard numbers, store size, memory usage) and
information about the current nodes that form the cluster (number, roles, os, jvm
versions, memory usage, cpu and installed plugins).
Returns cluster statistics.


[[cluster-stats-api-request]]
==== {api-request-title}

`GET /_cluster/stats` +

`GET /_cluster/stats/nodes/{node_id}`


[[cluster-stats-api-desc]]
==== {api-description-title}

The Cluster Stats API allows to retrieve statistics from a cluster wide
perspective. The API returns basic index metrics (shard numbers, store size,
memory usage) and information about the current nodes that form the cluster
(number, roles, os, jvm versions, memory usage, cpu and installed plugins).


[[cluster-stats-api-path-params]]
==== {api-path-parms-title}


include::{docdir}/rest-api/common-parms.asciidoc[tag=node-id]


[[cluster-stats-api-query-params]]
==== {api-query-parms-title}

include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings]

include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]


[[cluster-stats-api-example]]
==== {api-examples-title}

[source,js]
--------------------------------------------------
Expand All @@ -13,7 +46,8 @@ GET /_cluster/stats?human&pretty
// CONSOLE
// TEST[setup:twitter]

Will return, for example:
The API returns the following response:

["source","js",subs="attributes,callouts"]
--------------------------------------------------
{
Expand Down
6 changes: 6 additions & 0 deletions docs/reference/rest-api/common-parms.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ tag::cat-h[]
(Optional, string) Comma-separated list of column names to display.
end::cat-h[]

tag::flat-settings[]
`flat_settings`::
(Optional, boolean) If `true`, returns settings in flat format. Defaults to
`false`.
end::flat-settings[]

tag::help[]
`help`::
(Optional, boolean) If `true`, the response returns help information. Defaults
Expand Down

0 comments on commit 3830e53

Please sign in to comment.