nodes-info.asciidoc 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. [[cluster-nodes-info]]
  2. === Nodes Info
  3. Returns cluster nodes information.
  4. [[cluster-nodes-info-api-request]]
  5. ==== {api-request-title}
  6. `GET /_nodes` +
  7. `GET /_nodes/{node_id}` +
  8. `GET /_nodes/{metric}` +
  9. `GET /_nodes/{node_id}/{metric}`
  10. [[cluster-nodes-info-api-desc]]
  11. ==== {api-description-title}
  12. The cluster nodes info API allows to retrieve one or more (or all) of
  13. the cluster nodes information. All the nodes selective options are explained
  14. <<cluster-nodes,here>>.
  15. By default, it returns all attributes and core settings for a node.
  16. [[cluster-nodes-info-api-path-params]]
  17. ==== {api-path-parms-title}
  18. `{metric}`::
  19. (Optional, string) Limits the information returned to the specific metrics.
  20. A comma-separated list of the following options:
  21. +
  22. --
  23. `http`::
  24. HTTP connection information.
  25. `ingest`::
  26. Statistics about ingest preprocessing.
  27. `jvm`::
  28. JVM stats, memory pool information, garbage collection, buffer pools, number
  29. of loaded/unloaded classes.
  30. `os`::
  31. Operating system stats, load average, mem, swap.
  32. `plugins`::
  33. Details about the installed plugins and modules per node. The following
  34. information are available for each plugin and module:
  35. +
  36. ---
  37. * `name`: plugin name
  38. * `version`: version of Elasticsearch the plugin was built for
  39. * `description`: short description of the plugin's purpose
  40. * `classname`: fully-qualified class name of the plugin's entry point
  41. * `has_native_controller`: whether or not the plugin has a native controller
  42. process
  43. ---
  44. `process`::
  45. Process statistics, memory consumption, cpu usage, open file descriptors.
  46. `settings`::
  47. `thread_pool`::
  48. Statistics about each thread pool, including current size, queue and
  49. rejected tasks
  50. `transport`::
  51. Transport statistics about sent and received bytes in cluster communication.
  52. --
  53. include::{docdir}/rest-api/common-parms.asciidoc[tag=node-id]
  54. [[cluster-nodes-info-api-response-body]]
  55. ==== {api-response-body-title}
  56. `build_hash`::
  57. Short hash of the last git commit in this release.
  58. `host`::
  59. The node's host name.
  60. `ip`::
  61. The node's IP address.
  62. `name`::
  63. The node's name.
  64. `total_indexing_buffer`::
  65. Total heap allowed to be used to hold recently indexed
  66. documents before they must be written to disk. This size is
  67. a shared pool across all shards on this node, and is
  68. controlled by <<indexing-buffer,Indexing Buffer settings>>.
  69. `total_indexing_buffer_in_bytes`::
  70. Same as `total_indexing_buffer`, but expressed in bytes.
  71. `transport_address`::
  72. Host and port where transport HTTP connections are accepted.
  73. `version`::
  74. {es} version running on this node.
  75. The `os` flag can be set to retrieve information that concern the operating
  76. system:
  77. `os.refresh_interval_in_millis`::
  78. Refresh interval for the OS statistics
  79. `os.name`::
  80. Name of the operating system (ex: Linux, Windows, Mac OS X)
  81. `os.arch`::
  82. Name of the JVM architecture (ex: amd64, x86)
  83. `os.version`::
  84. Version of the operating system
  85. `os.available_processors`::
  86. Number of processors available to the Java virtual machine
  87. `os.allocated_processors`::
  88. The number of processors actually used to calculate thread pool size. This
  89. number can be set with the `processors` setting of a node and defaults to
  90. the number of processors reported by the OS. In both cases this number will
  91. never be larger than 32.
  92. The `process` flag can be set to retrieve information that concern the current
  93. running process:
  94. `process.refresh_interval_in_millis`::
  95. Refresh interval for the process statistics
  96. `process.id`::
  97. Process identifier (PID)
  98. `process.mlockall`::
  99. Indicates if the process address space has been successfully locked in memory
  100. [[cluster-nodes-info-api-query-params]]
  101. ==== {api-query-parms-title}
  102. include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  103. include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
  104. [[cluster-nodes-info-api-example]]
  105. ==== {api-examples-title}
  106. [source,js]
  107. --------------------------------------------------
  108. # return just process
  109. GET /_nodes/process
  110. # same as above
  111. GET /_nodes/_all/process
  112. # return just jvm and process of only nodeId1 and nodeId2
  113. GET /_nodes/nodeId1,nodeId2/jvm,process
  114. # same as above
  115. GET /_nodes/nodeId1,nodeId2/info/jvm,process
  116. # return all the information of only nodeId1 and nodeId2
  117. GET /_nodes/nodeId1,nodeId2/_all
  118. --------------------------------------------------
  119. // CONSOLE
  120. The `_all` flag can be set to return all the information - or you can omit it.
  121. [[cluster-nodes-info-api-example-plugins]]
  122. ===== Example for plugins metric
  123. If `plugins` is specified, the result will contain details about the installed
  124. plugins and modules:
  125. [source,js]
  126. --------------------------------------------------
  127. GET /_nodes/plugins
  128. --------------------------------------------------
  129. // CONSOLE
  130. // TEST[setup:node]
  131. The API returns the following response:
  132. [source,js]
  133. --------------------------------------------------
  134. {
  135. "_nodes": ...
  136. "cluster_name": "elasticsearch",
  137. "nodes": {
  138. "USpTGYaBSIKbgSUJR2Z9lg": {
  139. "name": "node-0",
  140. "transport_address": "192.168.17:9300",
  141. "host": "node-0.elastic.co",
  142. "ip": "192.168.17",
  143. "version": "{version}",
  144. "build_flavor": "{build_flavor}",
  145. "build_type": "{build_type}",
  146. "build_hash": "587409e",
  147. "roles": [
  148. "master",
  149. "data",
  150. "ingest"
  151. ],
  152. "attributes": {},
  153. "plugins": [
  154. {
  155. "name": "analysis-icu",
  156. "version": "{version}",
  157. "description": "The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.",
  158. "classname": "org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin",
  159. "has_native_controller": false
  160. }
  161. ],
  162. "modules": [
  163. {
  164. "name": "lang-painless",
  165. "version": "{version}",
  166. "description": "An easy, safe and fast scripting language for Elasticsearch",
  167. "classname": "org.elasticsearch.painless.PainlessPlugin",
  168. "has_native_controller": false
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. --------------------------------------------------
  175. // TESTRESPONSE[s/"_nodes": \.\.\./"_nodes": $body.$_path,/]
  176. // TESTRESPONSE[s/"elasticsearch"/$body.cluster_name/]
  177. // TESTRESPONSE[s/"USpTGYaBSIKbgSUJR2Z9lg"/\$node_name/]
  178. // TESTRESPONSE[s/"name": "node-0"/"name": $body.$_path/]
  179. // TESTRESPONSE[s/"transport_address": "192.168.17:9300"/"transport_address": $body.$_path/]
  180. // TESTRESPONSE[s/"host": "node-0.elastic.co"/"host": $body.$_path/]
  181. // TESTRESPONSE[s/"ip": "192.168.17"/"ip": $body.$_path/]
  182. // TESTRESPONSE[s/"build_hash": "587409e"/"build_hash": $body.$_path/]
  183. // TESTRESPONSE[s/"roles": \[[^\]]*\]/"roles": $body.$_path/]
  184. // TESTRESPONSE[s/"attributes": \{[^\}]*\}/"attributes": $body.$_path/]
  185. // TESTRESPONSE[s/"plugins": \[[^\]]*\]/"plugins": $body.$_path/]
  186. // TESTRESPONSE[s/"modules": \[[^\]]*\]/"modules": $body.$_path/]
  187. [[cluster-nodes-info-api-example-ingest]]
  188. ===== Example for ingest metric
  189. If `ingest` is specified, the response contains details about the available
  190. processors per node:
  191. [source,js]
  192. --------------------------------------------------
  193. GET /_nodes/ingest
  194. --------------------------------------------------
  195. // CONSOLE
  196. // TEST[setup:node]
  197. The API returns the following response:
  198. [source,js]
  199. --------------------------------------------------
  200. {
  201. "_nodes": ...
  202. "cluster_name": "elasticsearch",
  203. "nodes": {
  204. "USpTGYaBSIKbgSUJR2Z9lg": {
  205. "name": "node-0",
  206. "transport_address": "192.168.17:9300",
  207. "host": "node-0.elastic.co",
  208. "ip": "192.168.17",
  209. "version": "{version}",
  210. "build_flavor": "{build_flavor}",
  211. "build_type": "{build_type}",
  212. "build_hash": "587409e",
  213. "roles": [],
  214. "attributes": {},
  215. "ingest": {
  216. "processors": [
  217. {
  218. "type": "date"
  219. },
  220. {
  221. "type": "uppercase"
  222. },
  223. {
  224. "type": "set"
  225. },
  226. {
  227. "type": "lowercase"
  228. },
  229. {
  230. "type": "gsub"
  231. },
  232. {
  233. "type": "convert"
  234. },
  235. {
  236. "type": "remove"
  237. },
  238. {
  239. "type": "fail"
  240. },
  241. {
  242. "type": "foreach"
  243. },
  244. {
  245. "type": "split"
  246. },
  247. {
  248. "type": "trim"
  249. },
  250. {
  251. "type": "rename"
  252. },
  253. {
  254. "type": "join"
  255. },
  256. {
  257. "type": "append"
  258. }
  259. ]
  260. }
  261. }
  262. }
  263. }
  264. --------------------------------------------------
  265. // TESTRESPONSE[s/"_nodes": \.\.\./"_nodes": $body.$_path,/]
  266. // TESTRESPONSE[s/"elasticsearch"/$body.cluster_name/]
  267. // TESTRESPONSE[s/"USpTGYaBSIKbgSUJR2Z9lg"/\$node_name/]
  268. // TESTRESPONSE[s/"name": "node-0"/"name": $body.$_path/]
  269. // TESTRESPONSE[s/"transport_address": "192.168.17:9300"/"transport_address": $body.$_path/]
  270. // TESTRESPONSE[s/"host": "node-0.elastic.co"/"host": $body.$_path/]
  271. // TESTRESPONSE[s/"ip": "192.168.17"/"ip": $body.$_path/]
  272. // TESTRESPONSE[s/"build_hash": "587409e"/"build_hash": $body.$_path/]
  273. // TESTRESPONSE[s/"roles": \[[^\]]*\]/"roles": $body.$_path/]
  274. // TESTRESPONSE[s/"attributes": \{[^\}]*\}/"attributes": $body.$_path/]
  275. // TESTRESPONSE[s/"processors": \[[^\]]*\]/"processors": $body.$_path/]