nodes-stats.asciidoc 11 KB

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