nodes-stats.asciidoc 11 KB

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