nodes-stats.asciidoc 13 KB

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