nodes-info.asciidoc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. [[cluster-nodes-info]]
  2. === Nodes info API
  3. ++++
  4. <titleabbrev>Nodes info</titleabbrev>
  5. ++++
  6. .New API reference
  7. [sidebar]
  8. --
  9. For the most up-to-date API details, refer to {api-es}/group/endpoint-cluster[Cluster APIs].
  10. --
  11. Returns cluster nodes information.
  12. [[cluster-nodes-info-api-request]]
  13. ==== {api-request-title}
  14. `GET /_nodes` +
  15. `GET /_nodes/<node_id>` +
  16. `GET /_nodes/<metric>` +
  17. `GET /_nodes/<node_id>/<metric>`
  18. [[cluster-nodes-info-api-prereqs]]
  19. ==== {api-prereq-title}
  20. * If the {es} {security-features} are enabled, you must have the `monitor` or
  21. `manage` <<privileges-list-cluster,cluster privilege>> to use this API.
  22. [[cluster-nodes-info-api-desc]]
  23. ==== {api-description-title}
  24. The cluster nodes info API allows to retrieve one or more (or all) of
  25. the cluster nodes information. All the nodes selective options are explained
  26. <<cluster-nodes,here>>.
  27. By default, it returns all attributes and core settings for a node.
  28. [role="child_attributes"]
  29. [[cluster-nodes-info-api-path-params]]
  30. ==== {api-path-parms-title}
  31. `<metric>`::
  32. (Optional, string)
  33. Limits the information returned to the specific metrics. Supports a
  34. comma-separated list, such as `http,ingest`.
  35. +
  36. [%collapsible%open]
  37. .Valid values for `<metric>`
  38. ====
  39. `aggregations`::
  40. Information about the available types of aggregation.
  41. `http`::
  42. Information about the HTTP interface of this node.
  43. `indices`::
  44. +
  45. --
  46. Node-level configuration related to indexing:
  47. * `total_indexing_buffer`: the maximum size of the indexing buffer on this node.
  48. --
  49. `ingest`::
  50. Information about ingest pipelines and processors.
  51. `jvm`::
  52. JVM information, including its name, its version, and its configuration.
  53. `os`::
  54. Operating system information, including its name and version.
  55. `plugins`::
  56. +
  57. --
  58. Details about the installed plugins and modules per node. The following
  59. information is available for each plugin and module:
  60. * `name`: plugin name
  61. * `version`: version of Elasticsearch the plugin was built for
  62. * `description`: short description of the plugin's purpose
  63. * `classname`: fully-qualified class name of the plugin's entry point
  64. * `has_native_controller`: whether or not the plugin has a native controller
  65. process
  66. --
  67. `process`::
  68. Process information, including the numeric process ID.
  69. `settings`::
  70. Lists all node settings in use as defined in the `elasticsearch.yml` file.
  71. `thread_pool`::
  72. Information about the configuration of each thread pool.
  73. `transport`::
  74. Information about the transport interface of the node.
  75. ====
  76. If you use the full `GET /_nodes/<node_id>/<metric>` form of this API then you
  77. can also request the metric `_all` to retrieve all metrics, or you can request
  78. the metric `_none` to suppress all metrics and retrieve only the identity of
  79. the node.
  80. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=node-id]
  81. [[cluster-nodes-info-api-response-body]]
  82. ==== {api-response-body-title}
  83. `build_hash`::
  84. Short hash of the last git commit in this release.
  85. `host`::
  86. The node's host name.
  87. `ip`::
  88. The node's IP address.
  89. `name`::
  90. The node's name.
  91. `total_indexing_buffer`::
  92. Total heap allowed to be used to hold recently indexed
  93. documents before they must be written to disk. This size is
  94. a shared pool across all shards on this node, and is
  95. controlled by <<indexing-buffer,Indexing Buffer settings>>.
  96. `total_indexing_buffer_in_bytes`::
  97. Same as `total_indexing_buffer`, but expressed in bytes.
  98. `transport_address`::
  99. Host and port where transport HTTP connections are accepted.
  100. `version`::
  101. {es} version running on this node.
  102. `transport_version`::
  103. The most recent transport version that this node can communicate with.
  104. `index_version`::
  105. The most recent index version that this node can read.
  106. `component_versions`::
  107. The version numbers of individual components loaded in this node.
  108. The `os` flag can be set to retrieve information that concern the operating
  109. system:
  110. `os.refresh_interval_in_millis`::
  111. Refresh interval for the OS statistics
  112. `os.name`::
  113. Name of the operating system (ex: Linux, Windows, Mac OS X)
  114. `os.arch`::
  115. Name of the JVM architecture (ex: amd64, x86)
  116. `os.version`::
  117. Version of the operating system
  118. `os.available_processors`::
  119. Number of processors available to the Java virtual machine
  120. `os.allocated_processors`::
  121. The number of processors actually used to calculate thread pool size. This
  122. number can be set with the <<node.processors, `node.processors`>>
  123. setting of a node and defaults to the number of processors reported by
  124. the OS.
  125. The `process` flag can be set to retrieve information that concern the current
  126. running process:
  127. `process.refresh_interval_in_millis`::
  128. Refresh interval for the process statistics
  129. `process.id`::
  130. Process identifier (PID)
  131. `process.mlockall`::
  132. Indicates if the process address space has been successfully locked in memory
  133. [[cluster-nodes-info-api-query-params]]
  134. ==== {api-query-parms-title}
  135. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  136. include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=timeout-nodes-request]
  137. [[cluster-nodes-info-api-example]]
  138. ==== {api-examples-title}
  139. [source,console]
  140. --------------------------------------------------
  141. # return just process
  142. GET /_nodes/process
  143. # same as above
  144. GET /_nodes/_all/process
  145. # return just jvm and process of only nodeId1 and nodeId2
  146. GET /_nodes/nodeId1,nodeId2/jvm,process
  147. # same as above
  148. GET /_nodes/nodeId1,nodeId2/info/jvm,process
  149. # return all the information of only nodeId1 and nodeId2
  150. GET /_nodes/nodeId1,nodeId2/_all
  151. --------------------------------------------------
  152. The `_all` flag can be set to return all the information - or you can omit it.
  153. [[cluster-nodes-info-api-example-plugins]]
  154. ===== Example for plugins metric
  155. If `plugins` is specified, the result will contain details about the installed
  156. plugins and modules:
  157. [source,console]
  158. --------------------------------------------------
  159. GET /_nodes/plugins
  160. --------------------------------------------------
  161. // TEST[setup:node]
  162. The API returns the following response:
  163. [source,console-result]
  164. --------------------------------------------------
  165. {
  166. "_nodes": ...
  167. "cluster_name": "elasticsearch",
  168. "nodes": {
  169. "USpTGYaBSIKbgSUJR2Z9lg": {
  170. "name": "node-0",
  171. "transport_address": "192.168.17:9300",
  172. "host": "node-0.elastic.co",
  173. "ip": "192.168.17",
  174. "version": "{version}",
  175. "transport_version": 100000298,
  176. "index_version": 100000074,
  177. "component_versions": {
  178. "ml_config_version": 100000162,
  179. "transform_config_version": 100000096
  180. },
  181. "build_flavor": "default",
  182. "build_type": "{build_type}",
  183. "build_hash": "587409e",
  184. "roles": [
  185. "master",
  186. "data",
  187. "ingest"
  188. ],
  189. "attributes": {},
  190. "plugins": [
  191. {
  192. "name": "analysis-icu",
  193. "version": "{version}",
  194. "description": "The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.",
  195. "classname": "org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin",
  196. "has_native_controller": false
  197. }
  198. ],
  199. "modules": [
  200. {
  201. "name": "lang-painless",
  202. "version": "{version}",
  203. "description": "An easy, safe and fast scripting language for Elasticsearch",
  204. "classname": "org.elasticsearch.painless.PainlessPlugin",
  205. "has_native_controller": false
  206. }
  207. ]
  208. }
  209. }
  210. }
  211. --------------------------------------------------
  212. // TESTRESPONSE[s/"_nodes": \.\.\./"_nodes": $body.$_path,/]
  213. // TESTRESPONSE[s/"elasticsearch"/$body.cluster_name/]
  214. // TESTRESPONSE[s/"USpTGYaBSIKbgSUJR2Z9lg"/\$node_name/]
  215. // TESTRESPONSE[s/"name": "node-0"/"name": $body.$_path/]
  216. // TESTRESPONSE[s/"transport_address": "192.168.17:9300"/"transport_address": $body.$_path/]
  217. // TESTRESPONSE[s/"host": "node-0.elastic.co"/"host": $body.$_path/]
  218. // TESTRESPONSE[s/"ip": "192.168.17"/"ip": $body.$_path/]
  219. // TESTRESPONSE[s/"transport_version": 100000298/"transport_version": $body.$_path/]
  220. // TESTRESPONSE[s/"index_version": 100000074/"index_version": $body.$_path/]
  221. // TESTRESPONSE[s/"component_versions": \{[^\}]*\}/"component_versions": $body.$_path/]
  222. // TESTRESPONSE[s/"build_hash": "587409e"/"build_hash": $body.$_path/]
  223. // TESTRESPONSE[s/"roles": \[[^\]]*\]/"roles": $body.$_path/]
  224. // TESTRESPONSE[s/"attributes": \{[^\}]*\}/"attributes": $body.$_path/]
  225. // TESTRESPONSE[s/"plugins": \[[^\]]*\]/"plugins": $body.$_path/]
  226. // TESTRESPONSE[s/"modules": \[[^\]]*\]/"modules": $body.$_path/]
  227. [[cluster-nodes-info-api-example-ingest]]
  228. ===== Example for ingest metric
  229. If `ingest` is specified, the response contains details about the available
  230. processors per node:
  231. [source,console]
  232. --------------------------------------------------
  233. GET /_nodes/ingest
  234. --------------------------------------------------
  235. // TEST[setup:node]
  236. The API returns the following response:
  237. [source,console-result]
  238. --------------------------------------------------
  239. {
  240. "_nodes": ...
  241. "cluster_name": "elasticsearch",
  242. "nodes": {
  243. "USpTGYaBSIKbgSUJR2Z9lg": {
  244. "name": "node-0",
  245. "transport_address": "192.168.17:9300",
  246. "host": "node-0.elastic.co",
  247. "ip": "192.168.17",
  248. "version": "{version}",
  249. "transport_version": 100000298,
  250. "index_version": 100000074,
  251. "component_versions": {
  252. "ml_config_version": 100000162,
  253. "transform_config_version": 100000096
  254. },
  255. "build_flavor": "default",
  256. "build_type": "{build_type}",
  257. "build_hash": "587409e",
  258. "roles": [],
  259. "attributes": {},
  260. "ingest": {
  261. "processors": [
  262. {
  263. "type": "date"
  264. },
  265. {
  266. "type": "uppercase"
  267. },
  268. {
  269. "type": "set"
  270. },
  271. {
  272. "type": "lowercase"
  273. },
  274. {
  275. "type": "gsub"
  276. },
  277. {
  278. "type": "convert"
  279. },
  280. {
  281. "type": "remove"
  282. },
  283. {
  284. "type": "fail"
  285. },
  286. {
  287. "type": "foreach"
  288. },
  289. {
  290. "type": "split"
  291. },
  292. {
  293. "type": "trim"
  294. },
  295. {
  296. "type": "rename"
  297. },
  298. {
  299. "type": "join"
  300. },
  301. {
  302. "type": "append"
  303. }
  304. ]
  305. }
  306. }
  307. }
  308. }
  309. --------------------------------------------------
  310. // TESTRESPONSE[s/"_nodes": \.\.\./"_nodes": $body.$_path,/]
  311. // TESTRESPONSE[s/"elasticsearch"/$body.cluster_name/]
  312. // TESTRESPONSE[s/"USpTGYaBSIKbgSUJR2Z9lg"/\$node_name/]
  313. // TESTRESPONSE[s/"name": "node-0"/"name": $body.$_path/]
  314. // TESTRESPONSE[s/"transport_address": "192.168.17:9300"/"transport_address": $body.$_path/]
  315. // TESTRESPONSE[s/"host": "node-0.elastic.co"/"host": $body.$_path/]
  316. // TESTRESPONSE[s/"ip": "192.168.17"/"ip": $body.$_path/]
  317. // TESTRESPONSE[s/"transport_version": 100000298/"transport_version": $body.$_path/]
  318. // TESTRESPONSE[s/"index_version": 100000074/"index_version": $body.$_path/]
  319. // TESTRESPONSE[s/"component_versions": \{[^\}]*\}/"component_versions": $body.$_path/]
  320. // TESTRESPONSE[s/"build_hash": "587409e"/"build_hash": $body.$_path/]
  321. // TESTRESPONSE[s/"roles": \[[^\]]*\]/"roles": $body.$_path/]
  322. // TESTRESPONSE[s/"attributes": \{[^\}]*\}/"attributes": $body.$_path/]
  323. // TESTRESPONSE[s/"processors": \[[^\]]*\]/"processors": $body.$_path/]