nodes-info.asciidoc 9.3 KB

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