nodes-info.asciidoc 9.2 KB

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