nodes-info.asciidoc 9.9 KB

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