Documented the level parameter to nodes stats

Closes #24999
This commit is contained in:
Clinton Gormley 2017-06-01 12:11:21 +02:00
parent 856235fac2
commit 1b0c93b07c
2 changed files with 68 additions and 61 deletions

View File

@ -38,7 +38,6 @@ buildRestTests.expectedUnconvertedCandidates = [
'reference/aggregations/metrics/tophits-aggregation.asciidoc',
'reference/cluster/allocation-explain.asciidoc',
'reference/cluster/nodes-info.asciidoc',
'reference/cluster/nodes-stats.asciidoc',
'reference/cluster/pending.asciidoc',
'reference/cluster/state.asciidoc',
'reference/cluster/stats.asciidoc',

View File

@ -9,9 +9,10 @@ the cluster nodes statistics.
[source,js]
--------------------------------------------------
curl -XGET 'http://localhost:9200/_nodes/stats'
curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/stats'
GET /_nodes/stats
GET /_nodes/nodeId1,nodeId2/stats
--------------------------------------------------
// CONSOLE
The first command retrieves stats of all the nodes in the cluster. The
second command selectively retrieves nodes stats of only `nodeId1` and
@ -66,12 +67,15 @@ of `indices`, `os`, `process`, `jvm`, `transport`, `http`,
[source,js]
--------------------------------------------------
# return just indices
curl -XGET 'http://localhost:9200/_nodes/stats/indices'
GET /_nodes/stats/indices
# return just os and process
curl -XGET 'http://localhost:9200/_nodes/stats/os,process'
GET /_nodes/stats/os,process
# return just process for node with IP address 10.0.0.1
curl -XGET 'http://localhost:9200/_nodes/10.0.0.1/stats/process'
GET /_nodes/10.0.0.1/stats/process
--------------------------------------------------
// CONSOLE
All stats can be explicitly requested via `/_nodes/stats/_all` or `/_nodes/stats?metric=_all`.
@ -283,20 +287,23 @@ the current running process:
[[node-indices-stats]]
=== Indices statistics
You can get information about indices stats on node level or on index level.
You can get information about indices stats on `node`, `indices`, or `shards` level.
[source,js]
--------------------------------------------------
# Node level
curl -XGET 'http://localhost:9200/_nodes/stats/indices/fielddata?fields=field1,field2&pretty'
# Fielddata summarised by node
GET /_nodes/stats/indices/fielddata?fields=field1,field2
# Index level
curl -XGET 'http://localhost:9200/_stats/fielddata/?fields=field1,field2&pretty'
# Fielddata summarised by node and index
GET /_nodes/stats/indices/fielddata?level=indices&fields=field1,field2
# Fielddata summarised by node, index, and shard
GET /_nodes/stats/indices/fielddata?level=shards&fields=field1,field2
# You can use wildcards for field names
curl -XGET 'http://localhost:9200/_nodes/stats/indices/fielddata?fields=field*&pretty'
curl -XGET 'http://localhost:9200/_stats/fielddata/?fields=field*&pretty'
GET /_nodes/stats/indices/fielddata?fields=field*
--------------------------------------------------
// CONSOLE
Supported metrics are:
@ -328,11 +335,12 @@ on this node.
[source,js]
--------------------------------------------------
# All groups with all stats
curl -XGET 'http://localhost:9200/_nodes/stats?pretty&groups=_all'
GET /_nodes/stats?groups=_all
# Some groups from just the indices stats
curl -XGET 'http://localhost:9200/_nodes/stats/indices?pretty&groups=foo,bar'
GET /_nodes/stats/indices?groups=foo,bar
--------------------------------------------------
// CONSOLE
[float]
[[ingest-stats]]