stats.asciidoc 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508
  1. [[cluster-stats]]
  2. === Cluster stats API
  3. ++++
  4. <titleabbrev>Cluster stats</titleabbrev>
  5. ++++
  6. Returns cluster statistics.
  7. [[cluster-stats-api-request]]
  8. ==== {api-request-title}
  9. `GET /_cluster/stats` +
  10. `GET /_cluster/stats/nodes/<node_filter>`
  11. [[cluster-stats-api-prereqs]]
  12. ==== {api-prereq-title}
  13. * If the {es} {security-features} are enabled, you must have the `monitor` or
  14. `manage` <<privileges-list-cluster,cluster privilege>> to use this API.
  15. [[cluster-stats-api-desc]]
  16. ==== {api-description-title}
  17. The Cluster Stats API allows to retrieve statistics from a cluster wide
  18. perspective. The API returns basic index metrics (shard numbers, store size,
  19. memory usage) and information about the current nodes that form the cluster
  20. (number, roles, os, jvm versions, memory usage, cpu and installed plugins).
  21. [[cluster-stats-api-path-params]]
  22. ==== {api-path-parms-title}
  23. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=node-filter]
  24. [[cluster-stats-api-query-params]]
  25. ==== {api-query-parms-title}
  26. `timeout`::
  27. (Optional, <<time-units, time units>>)
  28. Period to wait for each node to respond. If a node does not respond before its
  29. timeout expires, the response does not include its stats. However, timed out
  30. nodes are included in the response's `_nodes.failed` property. Defaults to no
  31. timeout.
  32. [role="child_attributes"]
  33. [[cluster-stats-api-response-body]]
  34. ==== {api-response-body-title}
  35. `_nodes`::
  36. (object)
  37. Contains statistics about the number of nodes selected by the request's
  38. <<cluster-nodes,node filters>>.
  39. +
  40. .Properties of `_nodes`
  41. [%collapsible%open]
  42. ====
  43. `total`::
  44. (integer)
  45. Total number of nodes selected by the request.
  46. `successful`::
  47. (integer)
  48. Number of nodes that responded successfully to the request.
  49. `failed`::
  50. (integer)
  51. Number of nodes that rejected the request or failed to respond. If this value
  52. is not `0`, a reason for the rejection or failure is included in the response.
  53. ====
  54. `cluster_name`::
  55. (string)
  56. Name of the cluster, based on the <<cluster-name>> setting.
  57. `cluster_uuid`::
  58. (string)
  59. Unique identifier for the cluster.
  60. `timestamp`::
  61. (integer)
  62. {wikipedia}/Unix_time[Unix timestamp], in milliseconds, of
  63. the last time the cluster statistics were refreshed.
  64. `status`::
  65. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=cluster-health-status]
  66. +
  67. See <<cluster-health>>.
  68. [[cluster-stats-api-response-body-indices]]
  69. `indices`::
  70. (object)
  71. Contains statistics about indices with shards assigned to selected nodes.
  72. +
  73. .Properties of `indices`
  74. [%collapsible%open]
  75. ====
  76. `count`::
  77. (integer)
  78. Total number of indices with shards assigned to selected nodes.
  79. `shards`::
  80. (object)
  81. Contains statistics about shards assigned to selected nodes.
  82. +
  83. .Properties of `shards`
  84. [%collapsible%open]
  85. =====
  86. `total`::
  87. (integer)
  88. Total number of shards assigned to selected nodes.
  89. `primaries`::
  90. (integer)
  91. Number of primary shards assigned to selected nodes.
  92. `replication`::
  93. (float)
  94. Ratio of replica shards to primary shards across all selected nodes.
  95. `index`::
  96. (object)
  97. Contains statistics about shards assigned to selected nodes.
  98. +
  99. .Properties of `index`
  100. [%collapsible%open]
  101. ======
  102. `shards`::
  103. (object)
  104. Contains statistics about the number of shards assigned to selected nodes.
  105. +
  106. .Properties of `shards`
  107. [%collapsible%open]
  108. =======
  109. `min`::
  110. (integer)
  111. Minimum number of shards in an index, counting only shards assigned to
  112. selected nodes.
  113. `max`::
  114. (integer)
  115. Maximum number of shards in an index, counting only shards assigned to
  116. selected nodes.
  117. `avg`::
  118. (float)
  119. Mean number of shards in an index, counting only shards assigned to
  120. selected nodes.
  121. =======
  122. `primaries`::
  123. (object)
  124. Contains statistics about the number of primary shards assigned to selected
  125. nodes.
  126. +
  127. .Properties of `primaries`
  128. [%collapsible%open]
  129. =======
  130. `min`::
  131. (integer)
  132. Minimum number of primary shards in an index, counting only shards assigned
  133. to selected nodes.
  134. `max`::
  135. (integer)
  136. Maximum number of primary shards in an index, counting only shards assigned
  137. to selected nodes.
  138. `avg`::
  139. (float)
  140. Mean number of primary shards in an index, counting only shards assigned to
  141. selected nodes.
  142. =======
  143. `replication`::
  144. (object)
  145. Contains statistics about the number of replication shards assigned to selected
  146. nodes.
  147. +
  148. .Properties of `replication`
  149. [%collapsible%open]
  150. =======
  151. `min`::
  152. (float)
  153. Minimum replication factor in an index, counting only shards assigned to
  154. selected nodes.
  155. `max`::
  156. (float)
  157. Maximum replication factor in an index, counting only shards assigned to
  158. selected nodes.
  159. `avg`::
  160. (float)
  161. Mean replication factor in an index, counting only shards assigned to selected
  162. nodes.
  163. =======
  164. ======
  165. =====
  166. `docs`::
  167. (object)
  168. Contains counts for documents in selected nodes.
  169. +
  170. .Properties of `docs`
  171. [%collapsible%open]
  172. =====
  173. `count`::
  174. (integer)
  175. Total number of non-deleted documents across all primary shards assigned to
  176. selected nodes.
  177. +
  178. This number is based on documents in Lucene segments and may include documents
  179. from nested fields.
  180. `deleted`::
  181. (integer)
  182. Total number of deleted documents across all primary shards assigned to
  183. selected nodes.
  184. +
  185. This number is based on documents in Lucene segments. {es} reclaims the disk
  186. space of deleted Lucene documents when a segment is merged.
  187. =====
  188. `store`::
  189. (object)
  190. Contains statistics about the size of shards assigned to selected nodes.
  191. +
  192. .Properties of `store`
  193. [%collapsible%open]
  194. =====
  195. `size`::
  196. (<<byte-units, byte units>>)
  197. Total size of all shards assigned to selected nodes.
  198. `size_in_bytes`::
  199. (integer)
  200. Total size, in bytes, of all shards assigned to selected nodes.
  201. `total_data_set_size`::
  202. (<<byte-units, byte units>>)
  203. Total data set size of all shards assigned to selected nodes.
  204. This includes the size of shards not stored fully on the nodes (shared cache searchable snapshots).
  205. `total_data_set_size_in_bytes`::
  206. (integer)
  207. Total data set size, in bytes, of all shards assigned to selected nodes.
  208. This includes the size of shards not stored fully on the nodes (shared cache searchable snapshots).
  209. `reserved`::
  210. (<<byte-units,byte value>>)
  211. A prediction of how much larger the shard stores will eventually grow due to
  212. ongoing peer recoveries, restoring snapshots, and similar activities.
  213. `reserved_in_bytes`::
  214. (integer)
  215. A prediction, in bytes, of how much larger the shard stores will eventually
  216. grow due to ongoing peer recoveries, restoring snapshots, and similar
  217. activities.
  218. =====
  219. `fielddata`::
  220. (object)
  221. Contains statistics about the <<modules-fielddata, field data cache>> of selected nodes.
  222. +
  223. .Properties of `fielddata`
  224. [%collapsible%open]
  225. =====
  226. `memory_size`::
  227. (<<byte-units, byte units>>)
  228. Total amount of memory used for the field data cache across all shards
  229. assigned to selected nodes.
  230. `memory_size_in_bytes`::
  231. (integer)
  232. Total amount, in bytes, of memory used for the field data cache across all
  233. shards assigned to selected nodes.
  234. `evictions`::
  235. (integer)
  236. Total number of evictions from the field data cache across all shards assigned
  237. to selected nodes.
  238. =====
  239. `query_cache`::
  240. (object)
  241. Contains statistics about the query cache of selected nodes.
  242. +
  243. .Properties of `query_cache`
  244. [%collapsible%open]
  245. =====
  246. `memory_size`::
  247. (<<byte-units, byte units>>)
  248. Total amount of memory used for the query cache across all shards assigned to
  249. selected nodes.
  250. `memory_size_in_bytes`::
  251. (integer)
  252. Total amount, in bytes, of memory used for the query cache across all shards
  253. assigned to selected nodes.
  254. `total_count`::
  255. (integer)
  256. Total count of hits and misses in the query cache across all shards assigned to
  257. selected nodes.
  258. `hit_count`::
  259. (integer)
  260. Total count of query cache hits across all shards assigned to selected nodes.
  261. `miss_count`::
  262. (integer)
  263. Total count of query cache misses across all shards assigned to selected nodes.
  264. `cache_size`::
  265. (integer)
  266. Total number of entries currently in the query cache across all shards assigned
  267. to selected nodes.
  268. `cache_count`::
  269. (integer)
  270. Total number of entries added to the query cache across all shards assigned
  271. to selected nodes. This number includes current and evicted entries.
  272. `evictions`::
  273. (integer)
  274. Total number of query cache evictions across all shards assigned to selected
  275. nodes.
  276. =====
  277. `completion`::
  278. (object)
  279. Contains statistics about memory used for completion in selected nodes.
  280. +
  281. .Properties of `completion`
  282. [%collapsible%open]
  283. =====
  284. `size`::
  285. (<<byte-units, byte units>>)
  286. Total amount of memory used for completion across all shards assigned to
  287. selected nodes.
  288. `size_in_bytes`::
  289. (integer)
  290. Total amount, in bytes, of memory used for completion across all shards assigned
  291. to selected nodes.
  292. =====
  293. `segments`::
  294. (object)
  295. Contains statistics about segments in selected nodes.
  296. +
  297. .Properties of `segments`
  298. [%collapsible%open]
  299. =====
  300. `count`::
  301. (integer)
  302. Total number of segments across all shards assigned to selected nodes.
  303. `memory`::
  304. (<<byte-units, byte units>>)
  305. Total amount of memory used for segments across all shards assigned to selected
  306. nodes.
  307. `memory_in_bytes`::
  308. (integer)
  309. Total amount, in bytes, of memory used for segments across all shards assigned to
  310. selected nodes.
  311. `terms_memory`::
  312. (<<byte-units, byte units>>)
  313. Total amount of memory used for terms across all shards assigned to selected
  314. nodes.
  315. `terms_memory_in_bytes`::
  316. (integer)
  317. Total amount, in bytes, of memory used for terms across all shards assigned to
  318. selected nodes.
  319. `stored_fields_memory`::
  320. (<<byte-units, byte units>>)
  321. Total amount of memory used for stored fields across all shards assigned to
  322. selected nodes.
  323. `stored_fields_memory_in_bytes`::
  324. (integer)
  325. Total amount, in bytes, of memory used for stored fields across all shards
  326. assigned to selected nodes.
  327. `term_vectors_memory`::
  328. (<<byte-units, byte units>>)
  329. Total amount of memory used for term vectors across all shards assigned to
  330. selected nodes.
  331. `term_vectors_memory_in_bytes`::
  332. (integer)
  333. Total amount, in bytes, of memory used for term vectors across all shards
  334. assigned to selected nodes.
  335. `norms_memory`::
  336. (<<byte-units, byte units>>)
  337. Total amount of memory used for normalization factors across all shards assigned
  338. to selected nodes.
  339. `norms_memory_in_bytes`::
  340. (integer)
  341. Total amount, in bytes, of memory used for normalization factors across all
  342. shards assigned to selected nodes.
  343. `points_memory`::
  344. (<<byte-units, byte units>>)
  345. Total amount of memory used for points across all shards assigned to selected
  346. nodes.
  347. `points_memory_in_bytes`::
  348. (integer)
  349. Total amount, in bytes, of memory used for points across all shards assigned to
  350. selected nodes.
  351. `doc_values_memory`::
  352. (<<byte-units, byte units>>)
  353. Total amount of memory used for doc values across all shards assigned to
  354. selected nodes.
  355. `doc_values_memory_in_bytes`::
  356. (integer)
  357. Total amount, in bytes, of memory used for doc values across all shards assigned
  358. to selected nodes.
  359. `index_writer_memory`::
  360. (<<byte-units, byte units>>)
  361. Total amount of memory used by all index writers across all shards assigned to
  362. selected nodes.
  363. `index_writer_memory_in_bytes`::
  364. (integer)
  365. Total amount, in bytes, of memory used by all index writers across all shards
  366. assigned to selected nodes.
  367. `version_map_memory`::
  368. (<<byte-units, byte units>>)
  369. Total amount of memory used by all version maps across all shards assigned to
  370. selected nodes.
  371. `version_map_memory_in_bytes`::
  372. (integer)
  373. Total amount, in bytes, of memory used by all version maps across all shards
  374. assigned to selected nodes.
  375. `fixed_bit_set`::
  376. (<<byte-units, byte units>>)
  377. Total amount of memory used by fixed bit sets across all shards assigned to
  378. selected nodes.
  379. +
  380. Fixed bit sets are used for nested object field types and
  381. type filters for <<parent-join,join>> fields.
  382. `fixed_bit_set_memory_in_bytes`::
  383. (integer)
  384. Total amount of memory, in bytes, used by fixed bit sets across all shards
  385. assigned to selected nodes.
  386. `max_unsafe_auto_id_timestamp`::
  387. (integer)
  388. {wikipedia}/Unix_time[Unix timestamp], in milliseconds, of
  389. the most recently retried indexing request.
  390. `file_sizes`::
  391. (object)
  392. This object is not populated by the cluster stats API.
  393. +
  394. To get information on segment files, use the <<cluster-nodes-stats,node stats
  395. API>>.
  396. =====
  397. `mappings`::
  398. (object)
  399. Contains statistics about <<mapping,field mappings>> in selected nodes.
  400. +
  401. .Properties of `mappings`
  402. [%collapsible%open]
  403. =====
  404. `field_types`::
  405. (array of objects)
  406. Contains statistics about <<mapping-types,field data types>> used in selected
  407. nodes.
  408. +
  409. .Properties of `field_types` objects
  410. [%collapsible%open]
  411. ======
  412. `name`::
  413. (string)
  414. Field data type used in selected nodes.
  415. `count`::
  416. (integer)
  417. Number of fields mapped to the field data type in selected nodes.
  418. `index_count`::
  419. (integer)
  420. Number of indices containing a mapping of the field data type in selected nodes.
  421. `script_count`::
  422. (integer)
  423. Number of fields that declare a script.
  424. `lang`::
  425. (array of strings)
  426. Script languages used for the optional scripts
  427. `lines_max`::
  428. (integer)
  429. Maximum number of lines for a single field script
  430. `lines_total`::
  431. (integer)
  432. Total number of lines for the scripts
  433. `chars_max`::
  434. (integer)
  435. Maximum number of characters for a single field script
  436. `chars_total`::
  437. (integer)
  438. Total number of characters for the scripts
  439. `source_max`::
  440. (integer)
  441. Maximum number of accesses to _source for a single field script
  442. `source_total`::
  443. (integer)
  444. Total number of accesses to _source for the scripts
  445. `doc_max`::
  446. (integer)
  447. Maximum number of accesses to doc_values for a single field script
  448. `doc_total`::
  449. (integer)
  450. Total number of accesses to doc_values for the scripts
  451. ======
  452. `runtime_field_types`::
  453. (array of objects)
  454. Contains statistics about <<runtime-mapping-fields, runtime field data types>> used in selected
  455. nodes.
  456. +
  457. .Properties of `runtime_field_types` objects
  458. [%collapsible%open]
  459. ======
  460. `name`::
  461. (string)
  462. Field data type used in selected nodes.
  463. `count`::
  464. (integer)
  465. Number of runtime fields mapped to the field data type in selected nodes.
  466. `index_count`::
  467. (integer)
  468. Number of indices containing a mapping of the runtime field data type in selected nodes.
  469. `scriptless_count`::
  470. (integer)
  471. Number of runtime fields that don't declare a script.
  472. `shadowed_count`::
  473. (integer)
  474. Number of runtime fields that shadow an indexed field.
  475. `lang`::
  476. (array of strings)
  477. Script languages used for the runtime fields scripts
  478. `lines_max`::
  479. (integer)
  480. Maximum number of lines for a single runtime field script
  481. `lines_total`::
  482. (integer)
  483. Total number of lines for the scripts that define the current runtime field data type
  484. `chars_max`::
  485. (integer)
  486. Maximum number of characters for a single runtime field script
  487. `chars_total`::
  488. (integer)
  489. Total number of characters for the scripts that define the current runtime field data type
  490. `source_max`::
  491. (integer)
  492. Maximum number of accesses to _source for a single runtime field script
  493. `source_total`::
  494. (integer)
  495. Total number of accesses to _source for the scripts that define the current runtime field data type
  496. `doc_max`::
  497. (integer)
  498. Maximum number of accesses to doc_values for a single runtime field script
  499. `doc_total`::
  500. (integer)
  501. Total number of accesses to doc_values for the scripts that define the current runtime field data type
  502. ======
  503. =====
  504. `analysis`::
  505. (object)
  506. Contains statistics about <<analyzer-anatomy,analyzers and analyzer components>>
  507. used in selected nodes.
  508. +
  509. .Properties of `analysis`
  510. [%collapsible%open]
  511. =====
  512. `char_filter_types`::
  513. (array of objects)
  514. Contains statistics about <<analysis-charfilters,character filter>> types used
  515. in selected nodes.
  516. +
  517. .Properties of `char_filter_types` objects
  518. [%collapsible%open]
  519. ======
  520. `name`::
  521. (string)
  522. Character filter type used in selected nodes.
  523. `count`::
  524. (integer)
  525. Number of analyzers or normalizers using the character filter type in selected
  526. nodes.
  527. `index_count`::
  528. (integer)
  529. Number of indices the character filter type in selected nodes.
  530. ======
  531. `tokenizer_types`::
  532. (array of objects)
  533. Contains statistics about <<analysis-tokenizers,tokenizer>> types used in
  534. selected nodes.
  535. +
  536. .Properties of `tokenizer_types` objects
  537. [%collapsible%open]
  538. ======
  539. `name`::
  540. (string)
  541. Tokenizer type used in selected nodes.
  542. `count`::
  543. (integer)
  544. Number of analyzers or normalizers using the tokenizer type in selected nodes.
  545. `index_count`::
  546. (integer)
  547. Number of indices using the tokenizer type in selected nodes.
  548. ======
  549. `filter_types`::
  550. (array of objects)
  551. Contains statistics about <<analysis-tokenfilters,token filter>> types used in
  552. selected nodes.
  553. +
  554. .Properties of `filter_types` objects
  555. [%collapsible%open]
  556. ======
  557. `name`::
  558. (string)
  559. Token filter type used in selected nodes.
  560. `count`::
  561. (integer)
  562. Number of analyzers or normalizers using the token filter type in selected
  563. nodes.
  564. `index_count`::
  565. (integer)
  566. Number of indices using the token filter type in selected nodes.
  567. ======
  568. `analyzer_types`::
  569. (array of objects)
  570. Contains statistics about <<analyzer-anatomy,analyzer>> types used in selected
  571. nodes.
  572. +
  573. .Properties of `analyzer_types` objects
  574. [%collapsible%open]
  575. ======
  576. `name`::
  577. (string)
  578. Analyzer type used in selected nodes.
  579. `count`::
  580. (integer)
  581. Occurrences of the analyzer type in selected nodes.
  582. `index_count`::
  583. (integer)
  584. Number of indices using the analyzer type in selected nodes.
  585. ======
  586. `built_in_char_filters`::
  587. (array of objects)
  588. Contains statistics about built-in <<analysis-charfilters,character filters>>
  589. used in selected nodes.
  590. +
  591. .Properties of `built_in_char_filters` objects
  592. [%collapsible%open]
  593. ======
  594. `name`::
  595. (string)
  596. Built-in character filter used in selected nodes.
  597. `count`::
  598. (integer)
  599. Number of analyzers or normalizers using the built-in character filter in
  600. selected nodes.
  601. `index_count`::
  602. (integer)
  603. Number of indices using the built-in character filter in selected nodes.
  604. ======
  605. `built_in_tokenizers`::
  606. (array of objects)
  607. Contains statistics about built-in <<analysis-tokenizers,tokenizers>> used in
  608. selected nodes.
  609. +
  610. .Properties of `built_in_tokenizers` objects
  611. [%collapsible%open]
  612. ======
  613. `name`::
  614. (string)
  615. Built-in tokenizer used in selected nodes.
  616. `count`::
  617. (integer)
  618. Number of analyzers or normalizers using the built-in tokenizer in selected
  619. nodes.
  620. `index_count`::
  621. (integer)
  622. Number of indices using the built-in tokenizer in selected nodes.
  623. ======
  624. `built_in_filters`::
  625. (array of objects)
  626. Contains statistics about built-in <<analysis-tokenfilters,token filters>> used
  627. in selected nodes.
  628. +
  629. .Properties of `built_in_filters` objects
  630. [%collapsible%open]
  631. ======
  632. `name`::
  633. (string)
  634. Built-in token filter used in selected nodes.
  635. `count`::
  636. (integer)
  637. Number of analyzers or normalizers using the built-in token filter in selected
  638. nodes.
  639. `index_count`::
  640. (integer)
  641. Number of indices using the built-in token filter in selected nodes.
  642. ======
  643. `built_in_analyzers`::
  644. (array of objects)
  645. Contains statistics about built-in <<analysis-analyzers,analyzers>> used in
  646. selected nodes.
  647. +
  648. .Properties of `built_in_analyzers` objects
  649. [%collapsible%open]
  650. ======
  651. `name`::
  652. (string)
  653. Built-in analyzer used in selected nodes.
  654. `count`::
  655. (integer)
  656. Occurrences of the built-in analyzer in selected nodes.
  657. `index_count`::
  658. (integer)
  659. Number of indices using the built-in analyzer in selected nodes.
  660. ======
  661. =====
  662. ====
  663. [[cluster-stats-api-response-body-nodes]]
  664. `nodes`::
  665. (object)
  666. Contains statistics about nodes selected by the request's <<cluster-nodes,node
  667. filters>>.
  668. +
  669. .Properties of `nodes`
  670. [%collapsible%open]
  671. ====
  672. `count`::
  673. (object)
  674. Contains counts for nodes selected by the request's <<cluster-nodes,node
  675. filters>>.
  676. +
  677. .Properties of `count`
  678. [%collapsible%open]
  679. =====
  680. `total`::
  681. (integer)
  682. Total number of selected nodes.
  683. `coordinating_only`::
  684. (integer)
  685. Number of selected nodes without a <<modules-node,role>>. These nodes are
  686. considered <<coordinating-only-node,coordinating only>> nodes.
  687. `<role>`::
  688. (integer)
  689. Number of selected nodes with the role. For a list of roles, see
  690. <<modules-node>>.
  691. =====
  692. `versions`::
  693. (array of strings)
  694. Array of {es} versions used on selected nodes.
  695. `os`::
  696. (object)
  697. Contains statistics about the operating systems used by selected nodes.
  698. +
  699. .Properties of `os`
  700. [%collapsible%open]
  701. =====
  702. `available_processors`::
  703. (integer)
  704. Number of processors available to JVM across all selected nodes.
  705. `allocated_processors`::
  706. (integer)
  707. Number of processors used to calculate thread pool size across all selected
  708. nodes.
  709. +
  710. This number can be set with the `processors` setting of a node and defaults to
  711. the number of processors reported by the OS. In both cases, this number will
  712. never be larger than `32`.
  713. `names`::
  714. (array of objects)
  715. Contains statistics about operating systems used by selected nodes.
  716. +
  717. .Properties of `names`
  718. [%collapsible%open]
  719. ======
  720. `name`:::
  721. (string)
  722. Name of an operating system used by one or more selected nodes.
  723. `count`:::
  724. (string)
  725. Number of selected nodes using the operating system.
  726. ======
  727. `pretty_names`::
  728. (array of objects)
  729. Contains statistics about operating systems used by selected nodes.
  730. +
  731. .Properties of `pretty_names`
  732. [%collapsible%open]
  733. ======
  734. `pretty_name`:::
  735. (string)
  736. Human-readable name of an operating system used by one or more selected nodes.
  737. `count`:::
  738. (string)
  739. Number of selected nodes using the operating system.
  740. ======
  741. `architectures`::
  742. (array of objects)
  743. Contains statistics about processor architectures (for example, x86_64 or
  744. aarch64) used by selected nodes.
  745. +
  746. .Properties of `architectures`
  747. [%collapsible%open]
  748. ======
  749. `arch`:::
  750. (string)
  751. Name of an architecture used by one or more selected nodes.
  752. `count`:::
  753. (string)
  754. Number of selected nodes using the architecture.
  755. ======
  756. `mem`::
  757. (object)
  758. Contains statistics about memory used by selected nodes.
  759. +
  760. .Properties of `mem`
  761. [%collapsible%open]
  762. ======
  763. `total`::
  764. (<<byte-units, byte units>>)
  765. Total amount of physical memory across all selected nodes.
  766. `total_in_bytes`::
  767. (integer)
  768. Total amount, in bytes, of physical memory across all selected nodes.
  769. `free`::
  770. (<<byte-units, byte units>>)
  771. Amount of free physical memory across all selected nodes.
  772. `free_in_bytes`::
  773. (integer)
  774. Amount, in bytes, of free physical memory across all selected nodes.
  775. `used`::
  776. (<<byte-units, byte units>>)
  777. Amount of physical memory in use across all selected nodes.
  778. `used_in_bytes`::
  779. (integer)
  780. Amount, in bytes, of physical memory in use across all selected nodes.
  781. `free_percent`::
  782. (integer)
  783. Percentage of free physical memory across all selected nodes.
  784. `used_percent`::
  785. (integer)
  786. Percentage of physical memory in use across all selected nodes.
  787. ======
  788. =====
  789. `process`::
  790. (object)
  791. Contains statistics about processes used by selected nodes.
  792. +
  793. .Properties of `process`
  794. [%collapsible%open]
  795. =====
  796. `cpu`::
  797. (object)
  798. Contains statistics about CPU used by selected nodes.
  799. +
  800. .Properties of `cpu`
  801. [%collapsible%open]
  802. ======
  803. `percent`::
  804. (integer)
  805. Percentage of CPU used across all selected nodes. Returns `-1` if
  806. not supported.
  807. ======
  808. `open_file_descriptors`::
  809. (object)
  810. Contains statistics about open file descriptors in selected nodes.
  811. +
  812. .Properties of `open_file_descriptors`
  813. [%collapsible%open]
  814. ======
  815. `min`::
  816. (integer)
  817. Minimum number of concurrently open file descriptors across all selected nodes.
  818. Returns `-1` if not supported.
  819. `max`::
  820. (integer)
  821. Maximum number of concurrently open file descriptors allowed across all selected
  822. nodes. Returns `-1` if not supported.
  823. `avg`::
  824. (integer)
  825. Average number of concurrently open file descriptors. Returns `-1` if not
  826. supported.
  827. ======
  828. =====
  829. `jvm`::
  830. (object)
  831. Contains statistics about the Java Virtual Machines (JVMs) used by selected
  832. nodes.
  833. +
  834. .Properties of `jvm`
  835. [%collapsible%open]
  836. =====
  837. `max_uptime`::
  838. (<<time-units,time unit>>)
  839. Uptime duration since JVM last started.
  840. `max_uptime_in_millis`::
  841. (integer)
  842. Uptime duration, in milliseconds, since JVM last started.
  843. `versions`::
  844. (array of objects)
  845. Contains statistics about the JVM versions used by selected nodes.
  846. +
  847. .Properties of `versions`
  848. [%collapsible%open]
  849. ======
  850. `version`::
  851. (string)
  852. Version of JVM used by one or more selected nodes.
  853. `vm_name`::
  854. (string)
  855. Name of the JVM.
  856. `vm_version`::
  857. (string)
  858. Full version number of JVM.
  859. +
  860. The full version number includes a plus sign (`+`) followed by the build number.
  861. `vm_vendor`::
  862. (string)
  863. Vendor of the JVM.
  864. `bundled_jdk`::
  865. (Boolean)
  866. If `true`, the JVM includes a bundled Java Development Kit (JDK).
  867. `using_bundled_jdk`::
  868. (Boolean)
  869. If `true`, a bundled JDK is in use by JVM.
  870. `count`::
  871. (integer)
  872. Total number of selected nodes using JVM.
  873. ======
  874. `mem`::
  875. (object)
  876. Contains statistics about memory used by selected nodes.
  877. +
  878. .Properties of `mem`
  879. [%collapsible%open]
  880. ======
  881. `heap_used`::
  882. (<<byte-units, byte units>>)
  883. Memory currently in use by the heap across all selected nodes.
  884. `heap_used_in_bytes`::
  885. (integer)
  886. Memory, in bytes, currently in use by the heap across all selected nodes.
  887. `heap_max`::
  888. (<<byte-units, byte units>>)
  889. Maximum amount of memory, in bytes, available for use by the heap across all
  890. selected nodes.
  891. `heap_max_in_bytes`::
  892. (integer)
  893. Maximum amount of memory, in bytes, available for use by the heap across all
  894. selected nodes.
  895. ======
  896. `threads`::
  897. (integer)
  898. Number of active threads in use by JVM across all selected nodes.
  899. =====
  900. `fs`::
  901. (object)
  902. Contains statistics about file stores by selected nodes.
  903. +
  904. .Properties of `fs`
  905. [%collapsible%open]
  906. =====
  907. `total`::
  908. (<<byte-units, byte units>>)
  909. Total size of all file stores across all selected nodes.
  910. `total_in_bytes`::
  911. (integer)
  912. Total size, in bytes, of all file stores across all seleced nodes.
  913. `free`::
  914. (<<byte-units, byte units>>)
  915. Amount of unallocated disk space in file stores across all selected nodes.
  916. `free_in_bytes`::
  917. (integer)
  918. Total number of unallocated bytes in file stores across all selected nodes.
  919. `available`::
  920. (<<byte-units, byte units>>)
  921. Total amount of disk space available to JVM in file
  922. stores across all selected nodes.
  923. +
  924. Depending on OS or process-level restrictions, this amount may be less than
  925. `nodes.fs.free`. This is the actual amount of free disk space the selected {es}
  926. nodes can use.
  927. `available_in_bytes`::
  928. (integer)
  929. Total number of bytes available to JVM in file stores
  930. across all selected nodes.
  931. +
  932. Depending on OS or process-level restrictions, this number may be less than
  933. `nodes.fs.free_in_byes`. This is the actual amount of free disk space the
  934. selected {es} nodes can use.
  935. =====
  936. `plugins`::
  937. (array of objects)
  938. Contains statistics about installed plugins and modules by selected nodes.
  939. +
  940. If no plugins or modules are installed, this array is empty.
  941. +
  942. .Properties of `plugins`
  943. [%collapsible%open]
  944. =====
  945. `<plugin>`::
  946. (object)
  947. Contains statistics about an installed plugin or module.
  948. +
  949. .Properties of `<plugin>`
  950. [%collapsible%open]
  951. ======
  952. `name`:::
  953. (string)
  954. Name of the {es} plugin.
  955. `version`:::
  956. (string)
  957. {es} version for which the plugin was built.
  958. `elasticsearch_version`:::
  959. (string)
  960. {es} version for which the plugin was built.
  961. `java_version`:::
  962. (string)
  963. Java version for which the plugin was built.
  964. `description`:::
  965. (string)
  966. Short description of the plugin.
  967. `classname`:::
  968. (string)
  969. Class name used as the plugin's entry point.
  970. `extended_plugins`:::
  971. (array of strings)
  972. An array of other plugins extended by this plugin through the Java Service
  973. Provider Interface (SPI).
  974. +
  975. If this plugin extends no other plugins, this array is empty.
  976. `has_native_controller`:::
  977. (Boolean)
  978. If `true`, the plugin has a native controller process.
  979. ======
  980. =====
  981. `network_types`::
  982. (object)
  983. Contains statistics about the transport and HTTP networks used by selected
  984. nodes.
  985. +
  986. .Properties of `network_types`
  987. [%collapsible%open]
  988. =====
  989. `transport_types`::
  990. (object)
  991. Contains statistics about the transport network types used by selected nodes.
  992. +
  993. .Properties of `transport_types`
  994. [%collapsible%open]
  995. ======
  996. `<transport_type>`::
  997. (integer)
  998. Number of selected nodes using the transport type.
  999. ======
  1000. `http_types`::
  1001. (object)
  1002. Contains statistics about the HTTP network types used by selected nodes.
  1003. +
  1004. .Properties of `http_types`
  1005. [%collapsible%open]
  1006. ======
  1007. `<http_type>`::
  1008. (integer)
  1009. Number of selected nodes using the HTTP type.
  1010. ======
  1011. =====
  1012. `discovery_types`::
  1013. (object)
  1014. Contains statistics about the <<modules-discovery-hosts-providers,discovery
  1015. types>> used by selected nodes.
  1016. +
  1017. .Properties of `discovery_types`
  1018. [%collapsible%open]
  1019. =====
  1020. `<discovery_type>`::
  1021. (integer)
  1022. Number of selected nodes using the <<modules-discovery-hosts-providers,discovery
  1023. type>> to find other nodes.
  1024. =====
  1025. `packaging_types`::
  1026. (array of objects)
  1027. Contains statistics about {es} distributions installed on selected nodes.
  1028. +
  1029. .Properties of `packaging_types`
  1030. [%collapsible%open]
  1031. =====
  1032. `flavor`:::
  1033. (string)
  1034. Type of {es} distribution, such as `default` or `OSS`, used by one or more
  1035. selected nodes.
  1036. `type`:::
  1037. (string)
  1038. File type, such as `tar` or `zip`, used for the distribution package.
  1039. `count`:::
  1040. (integer)
  1041. Number of selected nodes using the distribution flavor and file type.
  1042. =====
  1043. ====
  1044. [[cluster-stats-api-example]]
  1045. ==== {api-examples-title}
  1046. [source,console]
  1047. --------------------------------------------------
  1048. GET /_cluster/stats?human&pretty
  1049. --------------------------------------------------
  1050. // TEST[setup:my_index]
  1051. The API returns the following response:
  1052. ["source","js",subs="attributes,callouts"]
  1053. --------------------------------------------------
  1054. {
  1055. "_nodes" : {
  1056. "total" : 1,
  1057. "successful" : 1,
  1058. "failed" : 0
  1059. },
  1060. "cluster_uuid": "YjAvIhsCQ9CbjWZb2qJw3Q",
  1061. "cluster_name": "elasticsearch",
  1062. "timestamp": 1459427693515,
  1063. "status": "green",
  1064. "indices": {
  1065. "count": 1,
  1066. "shards": {
  1067. "total": 5,
  1068. "primaries": 5,
  1069. "replication": 0,
  1070. "index": {
  1071. "shards": {
  1072. "min": 5,
  1073. "max": 5,
  1074. "avg": 5
  1075. },
  1076. "primaries": {
  1077. "min": 5,
  1078. "max": 5,
  1079. "avg": 5
  1080. },
  1081. "replication": {
  1082. "min": 0,
  1083. "max": 0,
  1084. "avg": 0
  1085. }
  1086. }
  1087. },
  1088. "docs": {
  1089. "count": 10,
  1090. "deleted": 0
  1091. },
  1092. "store": {
  1093. "size": "16.2kb",
  1094. "size_in_bytes": 16684,
  1095. "total_data_set_size": "16.2kb",
  1096. "total_data_set_size_in_bytes": 16684,
  1097. "reserved": "0b",
  1098. "reserved_in_bytes": 0
  1099. },
  1100. "fielddata": {
  1101. "memory_size": "0b",
  1102. "memory_size_in_bytes": 0,
  1103. "evictions": 0
  1104. },
  1105. "query_cache": {
  1106. "memory_size": "0b",
  1107. "memory_size_in_bytes": 0,
  1108. "total_count": 0,
  1109. "hit_count": 0,
  1110. "miss_count": 0,
  1111. "cache_size": 0,
  1112. "cache_count": 0,
  1113. "evictions": 0
  1114. },
  1115. "completion": {
  1116. "size": "0b",
  1117. "size_in_bytes": 0
  1118. },
  1119. "segments": {
  1120. "count": 4,
  1121. "memory": "8.6kb",
  1122. "memory_in_bytes": 8898,
  1123. "terms_memory": "6.3kb",
  1124. "terms_memory_in_bytes": 6522,
  1125. "stored_fields_memory": "1.2kb",
  1126. "stored_fields_memory_in_bytes": 1248,
  1127. "term_vectors_memory": "0b",
  1128. "term_vectors_memory_in_bytes": 0,
  1129. "norms_memory": "384b",
  1130. "norms_memory_in_bytes": 384,
  1131. "points_memory" : "0b",
  1132. "points_memory_in_bytes" : 0,
  1133. "doc_values_memory": "744b",
  1134. "doc_values_memory_in_bytes": 744,
  1135. "index_writer_memory": "0b",
  1136. "index_writer_memory_in_bytes": 0,
  1137. "version_map_memory": "0b",
  1138. "version_map_memory_in_bytes": 0,
  1139. "fixed_bit_set": "0b",
  1140. "fixed_bit_set_memory_in_bytes": 0,
  1141. "max_unsafe_auto_id_timestamp" : -9223372036854775808,
  1142. "file_sizes": {}
  1143. },
  1144. "mappings": {
  1145. "field_types": [],
  1146. "runtime_field_types": []
  1147. },
  1148. "analysis": {
  1149. "char_filter_types": [],
  1150. "tokenizer_types": [],
  1151. "filter_types": [],
  1152. "analyzer_types": [],
  1153. "built_in_char_filters": [],
  1154. "built_in_tokenizers": [],
  1155. "built_in_filters": [],
  1156. "built_in_analyzers": []
  1157. },
  1158. "versions": [
  1159. {
  1160. "version": "8.0.0",
  1161. "index_count": 1,
  1162. "primary_shard_count": 1,
  1163. "total_primary_size": "7.4kb",
  1164. "total_primary_bytes": 7632
  1165. }
  1166. ]
  1167. },
  1168. "nodes": {
  1169. "count": {
  1170. "total": 1,
  1171. "data": 1,
  1172. "coordinating_only": 0,
  1173. "master": 1,
  1174. "ingest": 1,
  1175. "voting_only": 0
  1176. },
  1177. "versions": [
  1178. "{version}"
  1179. ],
  1180. "os": {
  1181. "available_processors": 8,
  1182. "allocated_processors": 8,
  1183. "names": [
  1184. {
  1185. "name": "Mac OS X",
  1186. "count": 1
  1187. }
  1188. ],
  1189. "pretty_names": [
  1190. {
  1191. "pretty_name": "Mac OS X",
  1192. "count": 1
  1193. }
  1194. ],
  1195. "architectures": [
  1196. {
  1197. "arch": "x86_64",
  1198. "count": 1
  1199. }
  1200. ],
  1201. "mem" : {
  1202. "total" : "16gb",
  1203. "total_in_bytes" : 17179869184,
  1204. "free" : "78.1mb",
  1205. "free_in_bytes" : 81960960,
  1206. "used" : "15.9gb",
  1207. "used_in_bytes" : 17097908224,
  1208. "free_percent" : 0,
  1209. "used_percent" : 100
  1210. }
  1211. },
  1212. "process": {
  1213. "cpu": {
  1214. "percent": 9
  1215. },
  1216. "open_file_descriptors": {
  1217. "min": 268,
  1218. "max": 268,
  1219. "avg": 268
  1220. }
  1221. },
  1222. "jvm": {
  1223. "max_uptime": "13.7s",
  1224. "max_uptime_in_millis": 13737,
  1225. "versions": [
  1226. {
  1227. "version": "12",
  1228. "vm_name": "OpenJDK 64-Bit Server VM",
  1229. "vm_version": "12+33",
  1230. "vm_vendor": "Oracle Corporation",
  1231. "bundled_jdk": true,
  1232. "using_bundled_jdk": true,
  1233. "count": 1
  1234. }
  1235. ],
  1236. "mem": {
  1237. "heap_used": "57.5mb",
  1238. "heap_used_in_bytes": 60312664,
  1239. "heap_max": "989.8mb",
  1240. "heap_max_in_bytes": 1037959168
  1241. },
  1242. "threads": 90
  1243. },
  1244. "fs": {
  1245. "total": "200.6gb",
  1246. "total_in_bytes": 215429193728,
  1247. "free": "32.6gb",
  1248. "free_in_bytes": 35064553472,
  1249. "available": "32.4gb",
  1250. "available_in_bytes": 34802409472
  1251. },
  1252. "plugins": [
  1253. {
  1254. "name": "analysis-icu",
  1255. "version": "{version}",
  1256. "description": "The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.",
  1257. "classname": "org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin",
  1258. "has_native_controller": false
  1259. },
  1260. ...
  1261. ],
  1262. "ingest": {
  1263. "number_of_pipelines" : 1,
  1264. "processor_stats": {
  1265. ...
  1266. }
  1267. },
  1268. "network_types": {
  1269. ...
  1270. },
  1271. "discovery_types": {
  1272. ...
  1273. },
  1274. "packaging_types": [
  1275. {
  1276. ...
  1277. }
  1278. ]
  1279. }
  1280. }
  1281. --------------------------------------------------
  1282. // TESTRESPONSE[s/"plugins": \[[^\]]*\]/"plugins": $body.$_path/]
  1283. // TESTRESPONSE[s/"network_types": \{[^\}]*\}/"network_types": $body.$_path/]
  1284. // TESTRESPONSE[s/"discovery_types": \{[^\}]*\}/"discovery_types": $body.$_path/]
  1285. // TESTRESPONSE[s/"processor_stats": \{[^\}]*\}/"processor_stats": $body.$_path/]
  1286. // TESTRESPONSE[s/"count": \{[^\}]*\}/"count": $body.$_path/]
  1287. // TESTRESPONSE[s/"packaging_types": \[[^\]]*\]/"packaging_types": $body.$_path/]
  1288. // TESTRESPONSE[s/"field_types": \[[^\]]*\]/"field_types": $body.$_path/]
  1289. // TESTRESPONSE[s/"runtime_field_types": \[[^\]]*\]/"runtime_field_types": $body.$_path/]
  1290. // TESTRESPONSE[s/: true|false/: $body.$_path/]
  1291. // TESTRESPONSE[s/: (\-)?[0-9]+/: $body.$_path/]
  1292. // TESTRESPONSE[s/: "[^"]*"/: $body.$_path/]
  1293. // These replacements do a few things:
  1294. // 1. Ignore the contents of the `plugins` object because we don't know all of
  1295. // the plugins that will be in it. And because we figure folks don't need to
  1296. // see an exhaustive list anyway.
  1297. // 2. Similarly, ignore the contents of `network_types`, `discovery_types`, and
  1298. // `packaging_types`.
  1299. // 3. Ignore the contents of the (nodes) count object, as what's shown here
  1300. // depends on the license. Voting-only nodes are e.g. only shown when this
  1301. // test runs with a basic license.
  1302. // 4. All of the numbers and strings on the right hand side of *every* field in
  1303. // the response are ignored. So we're really only asserting things about the
  1304. // the shape of this response, not the values in it.
  1305. This API can be restricted to a subset of the nodes using <<cluster-nodes,node
  1306. filters>>:
  1307. [source,console]
  1308. --------------------------------------------------
  1309. GET /_cluster/stats/nodes/node1,node*,master:false
  1310. --------------------------------------------------