nodes-stats.asciidoc 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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. `os.cgroup.memory.control_group` (Linux only)::
  191. The `memory` control group to which the Elasticsearch process
  192. belongs
  193. `os.cgroup.memory.limit_in_bytes` (Linux only)::
  194. The maximum amount of user memory (including file cache) allowed
  195. for all tasks in the same cgroup as the Elasticsearch process.
  196. This value can be too big to store in a `long`, so is returned as
  197. a string so that the value returned can exactly match what the
  198. underlying operating system interface returns. Any value that is
  199. too large to parse into a `long` almost certainly means no limit
  200. has been set for the cgroup.
  201. `os.cgroup.memory.usage_in_bytes` (Linux only)::
  202. The total current memory usage by processes in the cgroup (in bytes)
  203. by all tasks in the same cgroup as the Elasticsearch process.
  204. This value is stored as a string for consistency with
  205. `os.cgroup.memory.limit_in_bytes`.
  206. NOTE: For the cgroup stats to be visible, cgroups must be compiled into
  207. the kernal, the `cpu` and `cpuacct` cgroup subsystems must be
  208. configured and stats must be readable from `/sys/fs/cgroup/cpu`
  209. and `/sys/fs/cgroup/cpuacct`.
  210. [float]
  211. [[process-stats]]
  212. ==== Process statistics
  213. The `process` flag can be set to retrieve statistics that concern
  214. the current running process:
  215. `process.timestamp`::
  216. Last time the process statistics have been refreshed
  217. `process.open_file_descriptors`::
  218. Number of opened file descriptors associated with the current process, or -1 if not supported
  219. `process.max_file_descriptors`::
  220. Maximum number of file descriptors allowed on the system, or -1 if not supported
  221. `process.cpu.percent`::
  222. CPU usage in percent, or -1 if not known at the time the stats are computed
  223. `process.cpu.total_in_millis`::
  224. CPU time (in milliseconds) used by the process on which the Java virtual machine is running, or -1 if not supported
  225. `process.mem.total_virtual_in_bytes`::
  226. Size in bytes of virtual memory that is guaranteed to be available to the running process
  227. [float]
  228. [[node-indices-stats]]
  229. === Indices statistics
  230. You can get information about indices stats on `node`, `indices`, or `shards` level.
  231. [source,js]
  232. --------------------------------------------------
  233. # Fielddata summarised by node
  234. GET /_nodes/stats/indices/fielddata?fields=field1,field2
  235. # Fielddata summarised by node and index
  236. GET /_nodes/stats/indices/fielddata?level=indices&fields=field1,field2
  237. # Fielddata summarised by node, index, and shard
  238. GET /_nodes/stats/indices/fielddata?level=shards&fields=field1,field2
  239. # You can use wildcards for field names
  240. GET /_nodes/stats/indices/fielddata?fields=field*
  241. --------------------------------------------------
  242. // CONSOLE
  243. Supported metrics are:
  244. * `completion`
  245. * `docs`
  246. * `fielddata`
  247. * `flush`
  248. * `get`
  249. * `indexing`
  250. * `merge`
  251. * `query_cache`
  252. * `recovery`
  253. * `refresh`
  254. * `request_cache`
  255. * `search`
  256. * `segments`
  257. * `store`
  258. * `suggest`
  259. * `translog`
  260. * `warmer`
  261. [float]
  262. [[search-groups]]
  263. === Search groups
  264. You can get statistics about search groups for searches executed
  265. on this node.
  266. [source,js]
  267. --------------------------------------------------
  268. # All groups with all stats
  269. GET /_nodes/stats?groups=_all
  270. # Some groups from just the indices stats
  271. GET /_nodes/stats/indices?groups=foo,bar
  272. --------------------------------------------------
  273. // CONSOLE
  274. [float]
  275. [[ingest-stats]]
  276. === Ingest statistics
  277. The `ingest` flag can be set to retrieve statistics that concern ingest:
  278. `ingest.total.count`::
  279. The total number of document ingested during the lifetime of this node
  280. `ingest.total.time_in_millis`::
  281. The total time spent on ingest preprocessing documents during the lifetime of this node
  282. `ingest.total.current`::
  283. The total number of documents currently being ingested.
  284. `ingest.total.failed`::
  285. The total number ingest preprocessing operations failed during the lifetime of this node
  286. On top of these overall ingest statistics, these statistics are also provided on a per pipeline basis.