nodes-stats.asciidoc 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. [[cluster-nodes-stats]]
  2. == Nodes Stats
  3. [float]
  4. === Nodes statistics
  5. The cluster nodes stats API allows to retrieve one or more (or all) of
  6. the cluster nodes statistics.
  7. [source,js]
  8. --------------------------------------------------
  9. curl -XGET 'http://localhost:9200/_nodes/stats'
  10. curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/stats'
  11. --------------------------------------------------
  12. The first command retrieves stats of all the nodes in the cluster. The
  13. second command selectively retrieves nodes stats of only `nodeId1` and
  14. `nodeId2`. All the nodes selective options are explained
  15. <<cluster-nodes,here>>.
  16. By default, all stats are returned. You can limit this by combining any
  17. of `indices`, `os`, `process`, `jvm`, `transport`, `http`,
  18. `fs`, `breaker` and `thread_pool`. For example:
  19. [horizontal]
  20. `indices`::
  21. Indices stats about size, document count, indexing and
  22. deletion times, search times, field cache size, merges and flushes
  23. `fs`::
  24. File system information, data path, free disk space, read/write
  25. stats (see <<fs-info,FS information>>)
  26. `http`::
  27. HTTP connection information
  28. `jvm`::
  29. JVM stats, memory pool information, garbage collection, buffer
  30. pools, number of loaded/unloaded classes
  31. `os`::
  32. Operating system stats, load average, mem, swap
  33. (see <<os-stats,OS statistics>>)
  34. `process`::
  35. Process statistics, memory consumption, cpu usage, open
  36. file descriptors (see <<process-stats,Process statistics>>)
  37. `thread_pool`::
  38. Statistics about each thread pool, including current
  39. size, queue and rejected tasks
  40. `transport`::
  41. Transport statistics about sent and received bytes in
  42. cluster communication
  43. `breaker`::
  44. Statistics about the field data circuit breaker
  45. `discovery`::
  46. Statistics about the discovery
  47. `ingest`::
  48. Statistics about ingest preprocessing
  49. [source,js]
  50. --------------------------------------------------
  51. # return indices and os
  52. curl -XGET 'http://localhost:9200/_nodes/stats/os'
  53. # return just os and process
  54. curl -XGET 'http://localhost:9200/_nodes/stats/os,process'
  55. # specific type endpoint
  56. curl -XGET 'http://localhost:9200/_nodes/stats/process'
  57. curl -XGET 'http://localhost:9200/_nodes/10.0.0.1/stats/process'
  58. --------------------------------------------------
  59. The `all` flag can be set to return all the stats.
  60. [float]
  61. [[fs-info]]
  62. ==== FS information
  63. The `fs` flag can be set to retrieve
  64. information that concern the file system:
  65. `fs.timestamp`::
  66. Last time the file stores statistics have been refreshed
  67. `fs.total.total_in_bytes`::
  68. Total size (in bytes) of all file stores
  69. `fs.total.free_in_bytes`::
  70. Total number of unallocated bytes in all file stores
  71. `fs.total.available_in_bytes`::
  72. Total number of bytes available to this Java virtual machine on all file stores
  73. `fs.data`::
  74. List of all file stores
  75. `fs.data.path`::
  76. Path to the file store
  77. `fs.data.mount`::
  78. Mount point of the file store (ex: /dev/sda2)
  79. `fs.data.type`::
  80. Type of the file store (ex: ext4)
  81. `fs.data.total_in_bytes`::
  82. Total size (in bytes) of the file store
  83. `fs.data.free_in_bytes`::
  84. Total number of unallocated bytes in the file store
  85. `fs.data.available_in_bytes`::
  86. Total number of bytes available to this Java virtual machine on this file store
  87. `fs.data.spins` (Linux only)::
  88. Indicates if the file store is backed by spinning storage.
  89. `null` means we could not determine it, `true` means the device possibly spins
  90. and `false` means it does not (ex: solid-state disks).
  91. `fs.io_stats.devices` (Linux only)::
  92. Array of disk metrics for each device that is backing an
  93. Elasticsearch data path. These disk metrics are probed periodically
  94. and averages between the last probe and the current probe are
  95. computed.
  96. `fs.io_stats.devices.device_name` (Linux only)::
  97. The Linux device name.
  98. `fs.io_stats.devices.operations` (Linux only)::
  99. The total number of read and write operations for the device
  100. completed since starting Elasticsearch.
  101. `fs.io_stats.devices.read_operations` (Linux only)::
  102. The total number of read operations for the device completed since
  103. starting Elasticsearch.
  104. `fs.io_stats.devices.write_operations` (Linux only)::
  105. The total number of write operations for the device completed since
  106. starting Elasticsearch.
  107. `fs.io_stats.devices.read_kilobytes` (Linux only)::
  108. The total number of kilobytes read for the device since starting
  109. Elasticsearch.
  110. `fs.io_stats.devices.write_kilobytes` (Linux only)::
  111. The total number of kilobytes written for the device since
  112. starting Elasticsearch.
  113. `fs.io_stats.operations` (Linux only)::
  114. The total number of read and write operations across all devices
  115. used by Elasticsearch completed since starting Elasticsearch.
  116. `fs.io_stats.read_operations` (Linux only)::
  117. The total number of read operations for across all devices used by
  118. Elasticsearch completed since starting Elasticsearch.
  119. `fs.io_stats.write_operations` (Linux only)::
  120. The total number of write operations across all devices used by
  121. Elasticsearch completed since starting Elasticsearch.
  122. `fs.io_stats.read_kilobytes` (Linux only)::
  123. The total number of kilobytes read across all devices used by
  124. Elasticsearch since starting Elasticsearch.
  125. `fs.io_stats.write_kilobytes` (Linux only)::
  126. The total number of kilobytes written across all devices used by
  127. Elasticsearch since starting Elasticsearch.
  128. [float]
  129. [[os-stats]]
  130. ==== Operating System statistics
  131. The `os` flag can be set to retrieve statistics that concern
  132. the operating system:
  133. `os.timestamp`::
  134. Last time the operating system statistics have been refreshed
  135. `os.cpu.percent`::
  136. Recent CPU usage for the whole system, or -1 if not supported
  137. `os.cpu.load_average.1m`::
  138. One-minute load average on the system (field is not present if
  139. one-minute load average is not available)
  140. `os.cpu.load_average.5m`::
  141. Five-minute load average on the system (field is not present if
  142. five-minute load average is not available)
  143. `os.cpu.load_average.15m`::
  144. Fifteen-minute load average on the system (field is not present if
  145. fifteen-minute load average is not available)
  146. `os.mem.total_in_bytes`::
  147. Total amount of physical memory in bytes
  148. `os.mem.free_in_bytes`::
  149. Amount of free physical memory in bytes
  150. `os.mem.free_percent`::
  151. Percentage of free memory
  152. `os.mem.used_in_bytes`::
  153. Amount of used physical memory in bytes
  154. `os.mem.used_percent`::
  155. Percentage of used memory
  156. `os.swap.total_in_bytes`::
  157. Total amount of swap space in bytes
  158. `os.swap.free_in_bytes`::
  159. Amount of free swap space in bytes
  160. `os.swap.used_in_bytes`::
  161. Amount of used swap space in bytes
  162. [float]
  163. [[process-stats]]
  164. ==== Process statistics
  165. The `process` flag can be set to retrieve statistics that concern
  166. the current running process:
  167. `process.timestamp`::
  168. Last time the process statistics have been refreshed
  169. `process.open_file_descriptors`::
  170. Number of opened file descriptors associated with the current process, or -1 if not supported
  171. `process.max_file_descriptors`::
  172. Maximum number of file descriptors allowed on the system, or -1 if not supported
  173. `process.cpu.percent`::
  174. CPU usage in percent, or -1 if not known at the time the stats are computed
  175. `process.cpu.total_in_millis`::
  176. CPU time (in milliseconds) used by the process on which the Java virtual machine is running, or -1 if not supported
  177. `process.mem.total_virtual_in_bytes`::
  178. Size in bytes of virtual memory that is guaranteed to be available to the running process
  179. [float]
  180. [[field-data]]
  181. === Field data statistics
  182. You can get information about field data memory usage on node
  183. level or on index level.
  184. [source,js]
  185. --------------------------------------------------
  186. # Node Stats
  187. curl -XGET 'http://localhost:9200/_nodes/stats/indices/?fields=field1,field2&pretty'
  188. # Indices Stat
  189. curl -XGET 'http://localhost:9200/_stats/fielddata/?fields=field1,field2&pretty'
  190. # You can use wildcards for field names
  191. curl -XGET 'http://localhost:9200/_stats/fielddata/?fields=field*&pretty'
  192. curl -XGET 'http://localhost:9200/_nodes/stats/indices/?fields=field*&pretty'
  193. --------------------------------------------------
  194. [float]
  195. [[search-groups]]
  196. === Search groups
  197. You can get statistics about search groups for searches executed
  198. on this node.
  199. [source,js]
  200. --------------------------------------------------
  201. # All groups with all stats
  202. curl -XGET 'http://localhost:9200/_nodes/stats?pretty&groups=_all'
  203. # Some groups from just the indices stats
  204. curl -XGET 'http://localhost:9200/_nodes/stats/indices?pretty&groups=foo,bar'
  205. --------------------------------------------------
  206. [float]
  207. [[ingest-stats]]
  208. === Ingest statistics
  209. The `ingest` flag can be set to retrieve statistics that concern ingest:
  210. `ingest.total.count`::
  211. The total number of document ingested during the lifetime of this node
  212. `ingest.total.time_in_millis`::
  213. The total time spent on ingest preprocessing documents during the lifetime of this node
  214. `ingest.total.current`::
  215. The total number of documents currently being ingested.
  216. `ingest.total.failed`::
  217. The total number ingest preprocessing operations failed during the lifetime of this node
  218. On top of these overall ingest statistics, these statistics are also provided on a per pipeline basis.