Skip to content

Commit 1b0c93b

Browse files
Documented the level parameter to nodes stats
Closes #24999
1 parent 856235f commit 1b0c93b

File tree

2 files changed

+68
-61
lines changed

2 files changed

+68
-61
lines changed

docs/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ buildRestTests.expectedUnconvertedCandidates = [
3838
'reference/aggregations/metrics/tophits-aggregation.asciidoc',
3939
'reference/cluster/allocation-explain.asciidoc',
4040
'reference/cluster/nodes-info.asciidoc',
41-
'reference/cluster/nodes-stats.asciidoc',
4241
'reference/cluster/pending.asciidoc',
4342
'reference/cluster/state.asciidoc',
4443
'reference/cluster/stats.asciidoc',

docs/reference/cluster/nodes-stats.asciidoc

Lines changed: 68 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ the cluster nodes statistics.
99

1010
[source,js]
1111
--------------------------------------------------
12-
curl -XGET 'http://localhost:9200/_nodes/stats'
13-
curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/stats'
12+
GET /_nodes/stats
13+
GET /_nodes/nodeId1,nodeId2/stats
1414
--------------------------------------------------
15+
// CONSOLE
1516

1617
The first command retrieves stats of all the nodes in the cluster. The
1718
second command selectively retrieves nodes stats of only `nodeId1` and
@@ -24,54 +25,57 @@ of `indices`, `os`, `process`, `jvm`, `transport`, `http`,
2425

2526
[horizontal]
2627
`indices`::
27-
Indices stats about size, document count, indexing and
28-
deletion times, search times, field cache size, merges and flushes
28+
Indices stats about size, document count, indexing and
29+
deletion times, search times, field cache size, merges and flushes
2930

3031
`fs`::
31-
File system information, data path, free disk space, read/write
32-
stats (see <<fs-info,FS information>>)
32+
File system information, data path, free disk space, read/write
33+
stats (see <<fs-info,FS information>>)
3334

3435
`http`::
35-
HTTP connection information
36+
HTTP connection information
3637

3738
`jvm`::
38-
JVM stats, memory pool information, garbage collection, buffer
39-
pools, number of loaded/unloaded classes
39+
JVM stats, memory pool information, garbage collection, buffer
40+
pools, number of loaded/unloaded classes
4041

4142
`os`::
42-
Operating system stats, load average, mem, swap
43-
(see <<os-stats,OS statistics>>)
43+
Operating system stats, load average, mem, swap
44+
(see <<os-stats,OS statistics>>)
4445

4546
`process`::
46-
Process statistics, memory consumption, cpu usage, open
47-
file descriptors (see <<process-stats,Process statistics>>)
47+
Process statistics, memory consumption, cpu usage, open
48+
file descriptors (see <<process-stats,Process statistics>>)
4849

4950
`thread_pool`::
50-
Statistics about each thread pool, including current
51-
size, queue and rejected tasks
51+
Statistics about each thread pool, including current
52+
size, queue and rejected tasks
5253

5354
`transport`::
54-
Transport statistics about sent and received bytes in
55-
cluster communication
55+
Transport statistics about sent and received bytes in
56+
cluster communication
5657

5758
`breaker`::
58-
Statistics about the field data circuit breaker
59+
Statistics about the field data circuit breaker
5960

6061
`discovery`::
61-
Statistics about the discovery
62+
Statistics about the discovery
6263

6364
`ingest`::
6465
Statistics about ingest preprocessing
6566

6667
[source,js]
6768
--------------------------------------------------
6869
# return just indices
69-
curl -XGET 'http://localhost:9200/_nodes/stats/indices'
70+
GET /_nodes/stats/indices
71+
7072
# return just os and process
71-
curl -XGET 'http://localhost:9200/_nodes/stats/os,process'
73+
GET /_nodes/stats/os,process
74+
7275
# return just process for node with IP address 10.0.0.1
73-
curl -XGET 'http://localhost:9200/_nodes/10.0.0.1/stats/process'
76+
GET /_nodes/10.0.0.1/stats/process
7477
--------------------------------------------------
78+
// CONSOLE
7579

7680
All stats can be explicitly requested via `/_nodes/stats/_all` or `/_nodes/stats?metric=_all`.
7781

@@ -83,42 +87,42 @@ The `fs` flag can be set to retrieve
8387
information that concern the file system:
8488

8589
`fs.timestamp`::
86-
Last time the file stores statistics have been refreshed
90+
Last time the file stores statistics have been refreshed
8791

8892
`fs.total.total_in_bytes`::
89-
Total size (in bytes) of all file stores
93+
Total size (in bytes) of all file stores
9094

9195
`fs.total.free_in_bytes`::
92-
Total number of unallocated bytes in all file stores
96+
Total number of unallocated bytes in all file stores
9397

9498
`fs.total.available_in_bytes`::
95-
Total number of bytes available to this Java virtual machine on all file stores
99+
Total number of bytes available to this Java virtual machine on all file stores
96100

97101
`fs.data`::
98-
List of all file stores
102+
List of all file stores
99103

100104
`fs.data.path`::
101-
Path to the file store
105+
Path to the file store
102106

103107
`fs.data.mount`::
104-
Mount point of the file store (ex: /dev/sda2)
108+
Mount point of the file store (ex: /dev/sda2)
105109

106110
`fs.data.type`::
107-
Type of the file store (ex: ext4)
111+
Type of the file store (ex: ext4)
108112

109113
`fs.data.total_in_bytes`::
110-
Total size (in bytes) of the file store
114+
Total size (in bytes) of the file store
111115

112116
`fs.data.free_in_bytes`::
113-
Total number of unallocated bytes in the file store
117+
Total number of unallocated bytes in the file store
114118

115119
`fs.data.available_in_bytes`::
116-
Total number of bytes available to this Java virtual machine on this file store
120+
Total number of bytes available to this Java virtual machine on this file store
117121

118122
`fs.data.spins` (Linux only)::
119-
Indicates if the file store is backed by spinning storage.
120-
`null` means we could not determine it, `true` means the device possibly spins
121-
and `false` means it does not (ex: solid-state disks).
123+
Indicates if the file store is backed by spinning storage.
124+
`null` means we could not determine it, `true` means the device possibly spins
125+
and `false` means it does not (ex: solid-state disks).
122126

123127
`fs.io_stats.devices` (Linux only)::
124128
Array of disk metrics for each device that is backing an
@@ -177,7 +181,7 @@ The `os` flag can be set to retrieve statistics that concern
177181
the operating system:
178182

179183
`os.timestamp`::
180-
Last time the operating system statistics have been refreshed
184+
Last time the operating system statistics have been refreshed
181185

182186
`os.cpu.percent`::
183187
Recent CPU usage for the whole system, or -1 if not supported
@@ -193,28 +197,28 @@ the operating system:
193197
fifteen-minute load average is not available)
194198

195199
`os.mem.total_in_bytes`::
196-
Total amount of physical memory in bytes
200+
Total amount of physical memory in bytes
197201

198202
`os.mem.free_in_bytes`::
199-
Amount of free physical memory in bytes
203+
Amount of free physical memory in bytes
200204

201205
`os.mem.free_percent`::
202-
Percentage of free memory
206+
Percentage of free memory
203207

204208
`os.mem.used_in_bytes`::
205-
Amount of used physical memory in bytes
209+
Amount of used physical memory in bytes
206210

207211
`os.mem.used_percent`::
208-
Percentage of used memory
212+
Percentage of used memory
209213

210214
`os.swap.total_in_bytes`::
211-
Total amount of swap space in bytes
215+
Total amount of swap space in bytes
212216

213217
`os.swap.free_in_bytes`::
214-
Amount of free swap space in bytes
218+
Amount of free swap space in bytes
215219

216220
`os.swap.used_in_bytes`::
217-
Amount of used swap space in bytes
221+
Amount of used swap space in bytes
218222

219223
`os.cgroup.cpuacct.control_group` (Linux only)::
220224
The `cpuacct` control group to which the Elasticsearch process
@@ -262,41 +266,44 @@ The `process` flag can be set to retrieve statistics that concern
262266
the current running process:
263267

264268
`process.timestamp`::
265-
Last time the process statistics have been refreshed
269+
Last time the process statistics have been refreshed
266270

267271
`process.open_file_descriptors`::
268-
Number of opened file descriptors associated with the current process, or -1 if not supported
272+
Number of opened file descriptors associated with the current process, or -1 if not supported
269273

270274
`process.max_file_descriptors`::
271-
Maximum number of file descriptors allowed on the system, or -1 if not supported
275+
Maximum number of file descriptors allowed on the system, or -1 if not supported
272276

273277
`process.cpu.percent`::
274-
CPU usage in percent, or -1 if not known at the time the stats are computed
278+
CPU usage in percent, or -1 if not known at the time the stats are computed
275279

276280
`process.cpu.total_in_millis`::
277-
CPU time (in milliseconds) used by the process on which the Java virtual machine is running, or -1 if not supported
281+
CPU time (in milliseconds) used by the process on which the Java virtual machine is running, or -1 if not supported
278282

279283
`process.mem.total_virtual_in_bytes`::
280-
Size in bytes of virtual memory that is guaranteed to be available to the running process
284+
Size in bytes of virtual memory that is guaranteed to be available to the running process
281285

282286
[float]
283287
[[node-indices-stats]]
284288
=== Indices statistics
285289

286-
You can get information about indices stats on node level or on index level.
290+
You can get information about indices stats on `node`, `indices`, or `shards` level.
287291

288292
[source,js]
289293
--------------------------------------------------
290-
# Node level
291-
curl -XGET 'http://localhost:9200/_nodes/stats/indices/fielddata?fields=field1,field2&pretty'
294+
# Fielddata summarised by node
295+
GET /_nodes/stats/indices/fielddata?fields=field1,field2
296+
297+
# Fielddata summarised by node and index
298+
GET /_nodes/stats/indices/fielddata?level=indices&fields=field1,field2
292299
293-
# Index level
294-
curl -XGET 'http://localhost:9200/_stats/fielddata/?fields=field1,field2&pretty'
300+
# Fielddata summarised by node, index, and shard
301+
GET /_nodes/stats/indices/fielddata?level=shards&fields=field1,field2
295302
296303
# You can use wildcards for field names
297-
curl -XGET 'http://localhost:9200/_nodes/stats/indices/fielddata?fields=field*&pretty'
298-
curl -XGET 'http://localhost:9200/_stats/fielddata/?fields=field*&pretty'
304+
GET /_nodes/stats/indices/fielddata?fields=field*
299305
--------------------------------------------------
306+
// CONSOLE
300307

301308
Supported metrics are:
302309

@@ -328,11 +335,12 @@ on this node.
328335
[source,js]
329336
--------------------------------------------------
330337
# All groups with all stats
331-
curl -XGET 'http://localhost:9200/_nodes/stats?pretty&groups=_all'
338+
GET /_nodes/stats?groups=_all
332339
333340
# Some groups from just the indices stats
334-
curl -XGET 'http://localhost:9200/_nodes/stats/indices?pretty&groups=foo,bar'
341+
GET /_nodes/stats/indices?groups=foo,bar
335342
--------------------------------------------------
343+
// CONSOLE
336344

337345
[float]
338346
[[ingest-stats]]

0 commit comments

Comments
 (0)