nodes-info.asciidoc 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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,console]
  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. The `_all` flag can be set to return all the information - or you can omit it.
  120. [[cluster-nodes-info-api-example-plugins]]
  121. ===== Example for plugins metric
  122. If `plugins` is specified, the result will contain details about the installed
  123. plugins and modules:
  124. [source,console]
  125. --------------------------------------------------
  126. GET /_nodes/plugins
  127. --------------------------------------------------
  128. // TEST[setup:node]
  129. The API returns the following response:
  130. [source,console-result]
  131. --------------------------------------------------
  132. {
  133. "_nodes": ...
  134. "cluster_name": "elasticsearch",
  135. "nodes": {
  136. "USpTGYaBSIKbgSUJR2Z9lg": {
  137. "name": "node-0",
  138. "transport_address": "192.168.17:9300",
  139. "host": "node-0.elastic.co",
  140. "ip": "192.168.17",
  141. "version": "{version}",
  142. "build_flavor": "{build_flavor}",
  143. "build_type": "{build_type}",
  144. "build_hash": "587409e",
  145. "roles": [
  146. "master",
  147. "data",
  148. "ingest"
  149. ],
  150. "attributes": {},
  151. "plugins": [
  152. {
  153. "name": "analysis-icu",
  154. "version": "{version}",
  155. "description": "The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.",
  156. "classname": "org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin",
  157. "has_native_controller": false
  158. }
  159. ],
  160. "modules": [
  161. {
  162. "name": "lang-painless",
  163. "version": "{version}",
  164. "description": "An easy, safe and fast scripting language for Elasticsearch",
  165. "classname": "org.elasticsearch.painless.PainlessPlugin",
  166. "has_native_controller": false
  167. }
  168. ]
  169. }
  170. }
  171. }
  172. --------------------------------------------------
  173. // TESTRESPONSE[s/"_nodes": \.\.\./"_nodes": $body.$_path,/]
  174. // TESTRESPONSE[s/"elasticsearch"/$body.cluster_name/]
  175. // TESTRESPONSE[s/"USpTGYaBSIKbgSUJR2Z9lg"/\$node_name/]
  176. // TESTRESPONSE[s/"name": "node-0"/"name": $body.$_path/]
  177. // TESTRESPONSE[s/"transport_address": "192.168.17:9300"/"transport_address": $body.$_path/]
  178. // TESTRESPONSE[s/"host": "node-0.elastic.co"/"host": $body.$_path/]
  179. // TESTRESPONSE[s/"ip": "192.168.17"/"ip": $body.$_path/]
  180. // TESTRESPONSE[s/"build_hash": "587409e"/"build_hash": $body.$_path/]
  181. // TESTRESPONSE[s/"roles": \[[^\]]*\]/"roles": $body.$_path/]
  182. // TESTRESPONSE[s/"attributes": \{[^\}]*\}/"attributes": $body.$_path/]
  183. // TESTRESPONSE[s/"plugins": \[[^\]]*\]/"plugins": $body.$_path/]
  184. // TESTRESPONSE[s/"modules": \[[^\]]*\]/"modules": $body.$_path/]
  185. [[cluster-nodes-info-api-example-ingest]]
  186. ===== Example for ingest metric
  187. If `ingest` is specified, the response contains details about the available
  188. processors per node:
  189. [source,console]
  190. --------------------------------------------------
  191. GET /_nodes/ingest
  192. --------------------------------------------------
  193. // TEST[setup:node]
  194. The API returns the following response:
  195. [source,console-result]
  196. --------------------------------------------------
  197. {
  198. "_nodes": ...
  199. "cluster_name": "elasticsearch",
  200. "nodes": {
  201. "USpTGYaBSIKbgSUJR2Z9lg": {
  202. "name": "node-0",
  203. "transport_address": "192.168.17:9300",
  204. "host": "node-0.elastic.co",
  205. "ip": "192.168.17",
  206. "version": "{version}",
  207. "build_flavor": "{build_flavor}",
  208. "build_type": "{build_type}",
  209. "build_hash": "587409e",
  210. "roles": [],
  211. "attributes": {},
  212. "ingest": {
  213. "processors": [
  214. {
  215. "type": "date"
  216. },
  217. {
  218. "type": "uppercase"
  219. },
  220. {
  221. "type": "set"
  222. },
  223. {
  224. "type": "lowercase"
  225. },
  226. {
  227. "type": "gsub"
  228. },
  229. {
  230. "type": "convert"
  231. },
  232. {
  233. "type": "remove"
  234. },
  235. {
  236. "type": "fail"
  237. },
  238. {
  239. "type": "foreach"
  240. },
  241. {
  242. "type": "split"
  243. },
  244. {
  245. "type": "trim"
  246. },
  247. {
  248. "type": "rename"
  249. },
  250. {
  251. "type": "join"
  252. },
  253. {
  254. "type": "append"
  255. }
  256. ]
  257. }
  258. }
  259. }
  260. }
  261. --------------------------------------------------
  262. // TESTRESPONSE[s/"_nodes": \.\.\./"_nodes": $body.$_path,/]
  263. // TESTRESPONSE[s/"elasticsearch"/$body.cluster_name/]
  264. // TESTRESPONSE[s/"USpTGYaBSIKbgSUJR2Z9lg"/\$node_name/]
  265. // TESTRESPONSE[s/"name": "node-0"/"name": $body.$_path/]
  266. // TESTRESPONSE[s/"transport_address": "192.168.17:9300"/"transport_address": $body.$_path/]
  267. // TESTRESPONSE[s/"host": "node-0.elastic.co"/"host": $body.$_path/]
  268. // TESTRESPONSE[s/"ip": "192.168.17"/"ip": $body.$_path/]
  269. // TESTRESPONSE[s/"build_hash": "587409e"/"build_hash": $body.$_path/]
  270. // TESTRESPONSE[s/"roles": \[[^\]]*\]/"roles": $body.$_path/]
  271. // TESTRESPONSE[s/"attributes": \{[^\}]*\}/"attributes": $body.$_path/]
  272. // TESTRESPONSE[s/"processors": \[[^\]]*\]/"processors": $body.$_path/]