nodes-stats.asciidoc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  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. GET /_nodes/stats
  10. GET /_nodes/nodeId1,nodeId2/stats
  11. --------------------------------------------------
  12. // CONSOLE
  13. The first command retrieves stats of all the nodes in the cluster. The
  14. second command selectively retrieves nodes stats of only `nodeId1` and
  15. `nodeId2`. All the nodes selective options are explained
  16. <<cluster-nodes,here>>.
  17. By default, all stats are returned. You can limit this by combining any
  18. of `indices`, `os`, `process`, `jvm`, `transport`, `http`,
  19. `fs`, `breaker` and `thread_pool`. For example:
  20. [horizontal]
  21. `indices`::
  22. Indices stats about size, document count, indexing and
  23. deletion times, search times, field cache size, merges and flushes
  24. `fs`::
  25. File system information, data path, free disk space, read/write
  26. stats (see <<fs-info,FS information>>)
  27. `http`::
  28. HTTP connection information
  29. `jvm`::
  30. JVM stats, memory pool information, garbage collection, buffer
  31. pools, number of loaded/unloaded classes
  32. `os`::
  33. Operating system stats, load average, mem, swap
  34. (see <<os-stats,OS statistics>>)
  35. `process`::
  36. Process statistics, memory consumption, cpu usage, open
  37. file descriptors (see <<process-stats,Process statistics>>)
  38. `thread_pool`::
  39. Statistics about each thread pool, including current
  40. size, queue and rejected tasks
  41. `transport`::
  42. Transport statistics about sent and received bytes in
  43. cluster communication
  44. `breaker`::
  45. Statistics about the field data circuit breaker
  46. `discovery`::
  47. Statistics about the discovery
  48. `ingest`::
  49. Statistics about ingest preprocessing
  50. [source,js]
  51. --------------------------------------------------
  52. # return just indices
  53. GET /_nodes/stats/indices
  54. # return just os and process
  55. GET /_nodes/stats/os,process
  56. # return just process for node with IP address 10.0.0.1
  57. GET /_nodes/10.0.0.1/stats/process
  58. --------------------------------------------------
  59. // CONSOLE
  60. All stats can be explicitly requested via `/_nodes/stats/_all` or `/_nodes/stats?metric=_all`.
  61. [float]
  62. [[fs-info]]
  63. ==== FS information
  64. The `fs` flag can be set to retrieve
  65. information that concern the file system:
  66. `fs.timestamp`::
  67. Last time the file stores statistics have been refreshed
  68. `fs.total.total_in_bytes`::
  69. Total size (in bytes) of all file stores
  70. `fs.total.free_in_bytes`::
  71. Total number of unallocated bytes in all file stores
  72. `fs.total.available_in_bytes`::
  73. Total number of bytes available to this Java virtual machine on all file stores
  74. `fs.data`::
  75. List of all file stores
  76. `fs.data.path`::
  77. Path to the file store
  78. `fs.data.mount`::
  79. Mount point of the file store (ex: /dev/sda2)
  80. `fs.data.type`::
  81. Type of the file store (ex: ext4)
  82. `fs.data.total_in_bytes`::
  83. Total size (in bytes) of the file store
  84. `fs.data.free_in_bytes`::
  85. Total number of unallocated bytes in the file store
  86. `fs.data.available_in_bytes`::
  87. Total number of bytes available to this Java virtual machine on this file store
  88. `fs.data.spins` (Linux only)::
  89. Indicates if the file store is backed by spinning storage.
  90. `null` means we could not determine it, `true` means the device possibly spins
  91. and `false` means it does not (ex: solid-state disks).
  92. `fs.io_stats.devices` (Linux only)::
  93. Array of disk metrics for each device that is backing an
  94. Elasticsearch data path. These disk metrics are probed periodically
  95. and averages between the last probe and the current probe are
  96. computed.
  97. `fs.io_stats.devices.device_name` (Linux only)::
  98. The Linux device name.
  99. `fs.io_stats.devices.operations` (Linux only)::
  100. The total number of read and write operations for the device
  101. completed since starting Elasticsearch.
  102. `fs.io_stats.devices.read_operations` (Linux only)::
  103. The total number of read operations for the device completed since
  104. starting Elasticsearch.
  105. `fs.io_stats.devices.write_operations` (Linux only)::
  106. The total number of write operations for the device completed since
  107. starting Elasticsearch.
  108. `fs.io_stats.devices.read_kilobytes` (Linux only)::
  109. The total number of kilobytes read for the device since starting
  110. Elasticsearch.
  111. `fs.io_stats.devices.write_kilobytes` (Linux only)::
  112. The total number of kilobytes written for the device since
  113. starting Elasticsearch.
  114. `fs.io_stats.operations` (Linux only)::
  115. The total number of read and write operations across all devices
  116. used by Elasticsearch completed since starting Elasticsearch.
  117. `fs.io_stats.read_operations` (Linux only)::
  118. The total number of read operations for across all devices used by
  119. Elasticsearch completed since starting Elasticsearch.
  120. `fs.io_stats.write_operations` (Linux only)::
  121. The total number of write operations across all devices used by
  122. Elasticsearch completed since starting Elasticsearch.
  123. `fs.io_stats.read_kilobytes` (Linux only)::
  124. The total number of kilobytes read across all devices used by
  125. Elasticsearch since starting Elasticsearch.
  126. `fs.io_stats.write_kilobytes` (Linux only)::
  127. The total number of kilobytes written across all devices used by
  128. Elasticsearch since starting Elasticsearch.
  129. [float]
  130. [[os-stats]]
  131. ==== Operating System statistics
  132. The `os` flag can be set to retrieve statistics that concern
  133. the operating system:
  134. `os.timestamp`::
  135. Last time the operating system statistics have been refreshed
  136. `os.cpu.percent`::
  137. Recent CPU usage for the whole system, or -1 if not supported
  138. `os.cpu.load_average.1m`::
  139. One-minute load average on the system (field is not present if
  140. one-minute load average is not available)
  141. `os.cpu.load_average.5m`::
  142. Five-minute load average on the system (field is not present if
  143. five-minute load average is not available)
  144. `os.cpu.load_average.15m`::
  145. Fifteen-minute load average on the system (field is not present if
  146. fifteen-minute load average is not available)
  147. `os.mem.total_in_bytes`::
  148. Total amount of physical memory in bytes
  149. `os.mem.free_in_bytes`::
  150. Amount of free physical memory in bytes
  151. `os.mem.free_percent`::
  152. Percentage of free memory
  153. `os.mem.used_in_bytes`::
  154. Amount of used physical memory in bytes
  155. `os.mem.used_percent`::
  156. Percentage of used memory
  157. `os.swap.total_in_bytes`::
  158. Total amount of swap space in bytes
  159. `os.swap.free_in_bytes`::
  160. Amount of free swap space in bytes
  161. `os.swap.used_in_bytes`::
  162. Amount of used swap space in bytes
  163. `os.cgroup.cpuacct.control_group` (Linux only)::
  164. The `cpuacct` control group to which the Elasticsearch process
  165. belongs
  166. `os.cgroup.cpuacct.usage_nanos` (Linux only)::
  167. The total CPU time (in nanoseconds) consumed by all tasks in the
  168. same cgroup as the Elasticsearch process
  169. `os.cgroup.cpu.control_group` (Linux only)::
  170. The `cpu` control group to which the Elasticsearch process belongs
  171. `os.cgroup.cpu.cfs_period_micros` (Linux only)::
  172. The period of time (in microseconds) for how regularly all tasks in
  173. the same cgroup as the Elasticsearch process should have their
  174. access to CPU resources reallocated.
  175. `os.cgroup.cpu.cfs_quota_micros` (Linux only)::
  176. The total amount of time (in microseconds) for which all tasks in
  177. the same cgroup as the Elasticsearch process can run during one
  178. period `os.cgroup.cpu.cfs_period_micros`
  179. `os.cgroup.cpu.stat.number_of_elapsed_periods` (Linux only)::
  180. The number of reporting periods (as specified by
  181. `os.cgroup.cpu.cfs_period_micros`) that have elapsed
  182. `os.cgroup.cpu.stat.number_of_times_throttled` (Linux only)::
  183. The number of times all tasks in the same cgroup as the
  184. Elasticsearch process have been throttled.
  185. `os.cgroup.cpu.stat.time_throttled_nanos` (Linux only)::
  186. The total amount of time (in nanoseconds) for which all tasks in
  187. the same cgroup as the Elasticsearch process have been throttled.
  188. NOTE: For the cgroup stats to be visible, cgroups must be compiled into
  189. the kernal, the `cpu` and `cpuacct` cgroup subsystems must be
  190. configured and stats must be readable from `/sys/fs/cgroup/cpu`
  191. and `/sys/fs/cgroup/cpuacct`.
  192. [float]
  193. [[process-stats]]
  194. ==== Process statistics
  195. The `process` flag can be set to retrieve statistics that concern
  196. the current running process:
  197. `process.timestamp`::
  198. Last time the process statistics have been refreshed
  199. `process.open_file_descriptors`::
  200. Number of opened file descriptors associated with the current process, or -1 if not supported
  201. `process.max_file_descriptors`::
  202. Maximum number of file descriptors allowed on the system, or -1 if not supported
  203. `process.cpu.percent`::
  204. CPU usage in percent, or -1 if not known at the time the stats are computed
  205. `process.cpu.total_in_millis`::
  206. CPU time (in milliseconds) used by the process on which the Java virtual machine is running, or -1 if not supported
  207. `process.mem.total_virtual_in_bytes`::
  208. Size in bytes of virtual memory that is guaranteed to be available to the running process
  209. [float]
  210. [[node-indices-stats]]
  211. === Indices statistics
  212. You can get information about indices stats on `node`, `indices`, or `shards` level.
  213. [source,js]
  214. --------------------------------------------------
  215. # Fielddata summarised by node
  216. GET /_nodes/stats/indices/fielddata?fields=field1,field2
  217. # Fielddata summarised by node and index
  218. GET /_nodes/stats/indices/fielddata?level=indices&fields=field1,field2
  219. # Fielddata summarised by node, index, and shard
  220. GET /_nodes/stats/indices/fielddata?level=shards&fields=field1,field2
  221. # You can use wildcards for field names
  222. GET /_nodes/stats/indices/fielddata?fields=field*
  223. --------------------------------------------------
  224. // CONSOLE
  225. Supported metrics are:
  226. * `completion`
  227. * `docs`
  228. * `fielddata`
  229. * `flush`
  230. * `get`
  231. * `indexing`
  232. * `merge`
  233. * `query_cache`
  234. * `recovery`
  235. * `refresh`
  236. * `request_cache`
  237. * `search`
  238. * `segments`
  239. * `store`
  240. * `suggest`
  241. * `translog`
  242. * `warmer`
  243. [float]
  244. [[search-groups]]
  245. === Search groups
  246. You can get statistics about search groups for searches executed
  247. on this node.
  248. [source,js]
  249. --------------------------------------------------
  250. # All groups with all stats
  251. GET /_nodes/stats?groups=_all
  252. # Some groups from just the indices stats
  253. GET /_nodes/stats/indices?groups=foo,bar
  254. --------------------------------------------------
  255. // CONSOLE
  256. [float]
  257. [[ingest-stats]]
  258. === Ingest statistics
  259. The `ingest` flag can be set to retrieve statistics that concern ingest:
  260. `ingest.total.count`::
  261. The total number of document ingested during the lifetime of this node
  262. `ingest.total.time_in_millis`::
  263. The total time spent on ingest preprocessing documents during the lifetime of this node
  264. `ingest.total.current`::
  265. The total number of documents currently being ingested.
  266. `ingest.total.failed`::
  267. The total number ingest preprocessing operations failed during the lifetime of this node
  268. On top of these overall ingest statistics, these statistics are also provided on a per pipeline basis.