nodes-stats.asciidoc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  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. `adaptive_selection`::
  51. Statistics about <<search-adaptive-replica,adaptive replica selection>>. See
  52. <<adaptive-selection-stats,adaptive selection statistics>>.
  53. [source,js]
  54. --------------------------------------------------
  55. # return just indices
  56. GET /_nodes/stats/indices
  57. # return just os and process
  58. GET /_nodes/stats/os,process
  59. # return just process for node with IP address 10.0.0.1
  60. GET /_nodes/10.0.0.1/stats/process
  61. --------------------------------------------------
  62. // CONSOLE
  63. All stats can be explicitly requested via `/_nodes/stats/_all` or `/_nodes/stats?metric=_all`.
  64. [float]
  65. [[fs-info]]
  66. ==== FS information
  67. The `fs` flag can be set to retrieve
  68. information that concern the file system:
  69. `fs.timestamp`::
  70. Last time the file stores statistics have been refreshed
  71. `fs.total.total_in_bytes`::
  72. Total size (in bytes) of all file stores
  73. `fs.total.free_in_bytes`::
  74. Total number of unallocated bytes in all file stores
  75. `fs.total.available_in_bytes`::
  76. Total number of bytes available to this Java virtual machine on all file stores.
  77. Depending on OS or process level restrictions, this might appear less than `fs.total.free_in_bytes`.
  78. This is the actual amount of free disk space the Elasticsearch node can utilise.
  79. `fs.data`::
  80. List of all file stores
  81. `fs.data.path`::
  82. Path to the file store
  83. `fs.data.mount`::
  84. Mount point of the file store (ex: /dev/sda2)
  85. `fs.data.type`::
  86. Type of the file store (ex: ext4)
  87. `fs.data.total_in_bytes`::
  88. Total size (in bytes) of the file store
  89. `fs.data.free_in_bytes`::
  90. Total number of unallocated bytes in the file store
  91. `fs.data.available_in_bytes`::
  92. Total number of bytes available to this Java virtual machine on this file store
  93. `fs.data.spins` (Linux only)::
  94. Indicates if the file store is backed by spinning storage.
  95. `null` means we could not determine it, `true` means the device possibly spins
  96. and `false` means it does not (ex: solid-state disks).
  97. `fs.io_stats.devices` (Linux only)::
  98. Array of disk metrics for each device that is backing an
  99. Elasticsearch data path. These disk metrics are probed periodically
  100. and averages between the last probe and the current probe are
  101. computed.
  102. `fs.io_stats.devices.device_name` (Linux only)::
  103. The Linux device name.
  104. `fs.io_stats.devices.operations` (Linux only)::
  105. The total number of read and write operations for the device
  106. completed since starting Elasticsearch.
  107. `fs.io_stats.devices.read_operations` (Linux only)::
  108. The total number of read operations for the device completed since
  109. starting Elasticsearch.
  110. `fs.io_stats.devices.write_operations` (Linux only)::
  111. The total number of write operations for the device completed since
  112. starting Elasticsearch.
  113. `fs.io_stats.devices.read_kilobytes` (Linux only)::
  114. The total number of kilobytes read for the device since starting
  115. Elasticsearch.
  116. `fs.io_stats.devices.write_kilobytes` (Linux only)::
  117. The total number of kilobytes written for the device since
  118. starting Elasticsearch.
  119. `fs.io_stats.operations` (Linux only)::
  120. The total number of read and write operations across all devices
  121. used by Elasticsearch completed since starting Elasticsearch.
  122. `fs.io_stats.read_operations` (Linux only)::
  123. The total number of read operations for across all devices used by
  124. Elasticsearch completed since starting Elasticsearch.
  125. `fs.io_stats.write_operations` (Linux only)::
  126. The total number of write operations across all devices used by
  127. Elasticsearch completed since starting Elasticsearch.
  128. `fs.io_stats.read_kilobytes` (Linux only)::
  129. The total number of kilobytes read across all devices used by
  130. Elasticsearch since starting Elasticsearch.
  131. `fs.io_stats.write_kilobytes` (Linux only)::
  132. The total number of kilobytes written across all devices used by
  133. Elasticsearch since starting Elasticsearch.
  134. [float]
  135. [[os-stats]]
  136. ==== Operating System statistics
  137. The `os` flag can be set to retrieve statistics that concern
  138. the operating system:
  139. `os.timestamp`::
  140. Last time the operating system statistics have been refreshed
  141. `os.cpu.percent`::
  142. Recent CPU usage for the whole system, or -1 if not supported
  143. `os.cpu.load_average.1m`::
  144. One-minute load average on the system (field is not present if
  145. one-minute load average is not available)
  146. `os.cpu.load_average.5m`::
  147. Five-minute load average on the system (field is not present if
  148. five-minute load average is not available)
  149. `os.cpu.load_average.15m`::
  150. Fifteen-minute load average on the system (field is not present if
  151. fifteen-minute load average is not available)
  152. `os.mem.total_in_bytes`::
  153. Total amount of physical memory in bytes
  154. `os.mem.free_in_bytes`::
  155. Amount of free physical memory in bytes
  156. `os.mem.free_percent`::
  157. Percentage of free memory
  158. `os.mem.used_in_bytes`::
  159. Amount of used physical memory in bytes
  160. `os.mem.used_percent`::
  161. Percentage of used memory
  162. `os.swap.total_in_bytes`::
  163. Total amount of swap space in bytes
  164. `os.swap.free_in_bytes`::
  165. Amount of free swap space in bytes
  166. `os.swap.used_in_bytes`::
  167. Amount of used swap space in bytes
  168. `os.cgroup.cpuacct.control_group` (Linux only)::
  169. The `cpuacct` control group to which the Elasticsearch process
  170. belongs
  171. `os.cgroup.cpuacct.usage_nanos` (Linux only)::
  172. The total CPU time (in nanoseconds) consumed by all tasks in the
  173. same cgroup as the Elasticsearch process
  174. `os.cgroup.cpu.control_group` (Linux only)::
  175. The `cpu` control group to which the Elasticsearch process belongs
  176. `os.cgroup.cpu.cfs_period_micros` (Linux only)::
  177. The period of time (in microseconds) for how regularly all tasks in
  178. the same cgroup as the Elasticsearch process should have their
  179. access to CPU resources reallocated.
  180. `os.cgroup.cpu.cfs_quota_micros` (Linux only)::
  181. The total amount of time (in microseconds) for which all tasks in
  182. the same cgroup as the Elasticsearch process can run during one
  183. period `os.cgroup.cpu.cfs_period_micros`
  184. `os.cgroup.cpu.stat.number_of_elapsed_periods` (Linux only)::
  185. The number of reporting periods (as specified by
  186. `os.cgroup.cpu.cfs_period_micros`) that have elapsed
  187. `os.cgroup.cpu.stat.number_of_times_throttled` (Linux only)::
  188. The number of times all tasks in the same cgroup as the
  189. Elasticsearch process have been throttled.
  190. `os.cgroup.cpu.stat.time_throttled_nanos` (Linux only)::
  191. The total amount of time (in nanoseconds) for which all tasks in
  192. the same cgroup as the Elasticsearch process have been throttled.
  193. `os.cgroup.memory.control_group` (Linux only)::
  194. The `memory` control group to which the Elasticsearch process
  195. belongs
  196. `os.cgroup.memory.limit_in_bytes` (Linux only)::
  197. The maximum amount of user memory (including file cache) allowed
  198. for all tasks in the same cgroup as the Elasticsearch process.
  199. This value can be too big to store in a `long`, so is returned as
  200. a string so that the value returned can exactly match what the
  201. underlying operating system interface returns. Any value that is
  202. too large to parse into a `long` almost certainly means no limit
  203. has been set for the cgroup.
  204. `os.cgroup.memory.usage_in_bytes` (Linux only)::
  205. The total current memory usage by processes in the cgroup (in bytes)
  206. by all tasks in the same cgroup as the Elasticsearch process.
  207. This value is stored as a string for consistency with
  208. `os.cgroup.memory.limit_in_bytes`.
  209. NOTE: For the cgroup stats to be visible, cgroups must be compiled into
  210. the kernal, the `cpu` and `cpuacct` cgroup subsystems must be
  211. configured and stats must be readable from `/sys/fs/cgroup/cpu`
  212. and `/sys/fs/cgroup/cpuacct`.
  213. [float]
  214. [[process-stats]]
  215. ==== Process statistics
  216. The `process` flag can be set to retrieve statistics that concern
  217. the current running process:
  218. `process.timestamp`::
  219. Last time the process statistics have been refreshed
  220. `process.open_file_descriptors`::
  221. Number of opened file descriptors associated with the current process, or -1 if not supported
  222. `process.max_file_descriptors`::
  223. Maximum number of file descriptors allowed on the system, or -1 if not supported
  224. `process.cpu.percent`::
  225. CPU usage in percent, or -1 if not known at the time the stats are computed
  226. `process.cpu.total_in_millis`::
  227. CPU time (in milliseconds) used by the process on which the Java virtual machine is running, or -1 if not supported
  228. `process.mem.total_virtual_in_bytes`::
  229. Size in bytes of virtual memory that is guaranteed to be available to the running process
  230. [float]
  231. [[node-indices-stats]]
  232. === Indices statistics
  233. You can get information about indices stats on `node`, `indices`, or `shards` level.
  234. [source,js]
  235. --------------------------------------------------
  236. # Fielddata summarised by node
  237. GET /_nodes/stats/indices/fielddata?fields=field1,field2
  238. # Fielddata summarised by node and index
  239. GET /_nodes/stats/indices/fielddata?level=indices&fields=field1,field2
  240. # Fielddata summarised by node, index, and shard
  241. GET /_nodes/stats/indices/fielddata?level=shards&fields=field1,field2
  242. # You can use wildcards for field names
  243. GET /_nodes/stats/indices/fielddata?fields=field*
  244. --------------------------------------------------
  245. // CONSOLE
  246. Supported metrics are:
  247. * `completion`
  248. * `docs`
  249. * `fielddata`
  250. * `flush`
  251. * `get`
  252. * `indexing`
  253. * `merge`
  254. * `query_cache`
  255. * `recovery`
  256. * `refresh`
  257. * `request_cache`
  258. * `search`
  259. * `segments`
  260. * `store`
  261. * `translog`
  262. * `warmer`
  263. [float]
  264. [[search-groups]]
  265. === Search groups
  266. You can get statistics about search groups for searches executed
  267. on this node.
  268. [source,js]
  269. --------------------------------------------------
  270. # All groups with all stats
  271. GET /_nodes/stats?groups=_all
  272. # Some groups from just the indices stats
  273. GET /_nodes/stats/indices?groups=foo,bar
  274. --------------------------------------------------
  275. // CONSOLE
  276. [float]
  277. [[ingest-stats]]
  278. === Ingest statistics
  279. The `ingest` flag can be set to retrieve statistics that concern ingest:
  280. `ingest.total.count`::
  281. The total number of document ingested during the lifetime of this node
  282. `ingest.total.time_in_millis`::
  283. The total time spent on ingest preprocessing documents during the lifetime of this node
  284. `ingest.total.current`::
  285. The total number of documents currently being ingested.
  286. `ingest.total.failed`::
  287. The total number ingest preprocessing operations failed during the lifetime of this node
  288. On top of these overall ingest statistics, these statistics are also provided on a per pipeline basis.
  289. [float]
  290. [[adaptive-selection-stats]]
  291. === Adaptive selection statistics
  292. The `adaptive_selection` flag can be set to retrieve statistics that concern
  293. <<search-adaptive-replica,adaptive replica selection>>. These statistics are
  294. keyed by node. For each node:
  295. `adaptive_selection.outgoing_searches`::
  296. The number of outstanding search requests from the node these stats are for to
  297. the keyed node.
  298. `avg_queue_size`::
  299. The exponentially weighted moving average queue size of search requests on the
  300. keyed node.
  301. `avg_service_time_ns`::
  302. The exponentially weighted moving average service time of search requests on
  303. the keyed node.
  304. `avg_response_time_ns`::
  305. The exponentially weighted moving average response time of search requests on
  306. the keyed node.
  307. `rank`::
  308. The rank of this node; used for shard selection when routing search requests.