| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347 | [[cluster-nodes-info]]=== Nodes info API++++<titleabbrev>Nodes info</titleabbrev>++++Returns cluster nodes information.[[cluster-nodes-info-api-request]]==== {api-request-title}`GET /_nodes` +`GET /_nodes/<node_id>` +`GET /_nodes/<metric>` +`GET /_nodes/<node_id>/<metric>`[[cluster-nodes-info-api-desc]]==== {api-description-title}The cluster nodes info API allows to retrieve one or more (or all) ofthe cluster nodes information. All the nodes selective options are explained<<cluster-nodes,here>>.By default, it returns all attributes and core settings for a node.[[cluster-nodes-info-api-path-params]]==== {api-path-parms-title}`<metric>`::		(Optional, string) Limits the information returned to the specific metrics.		A comma-separated list of the following options:+--`http`::		HTTP connection information.`ingest`::		Statistics about ingest preprocessing.`jvm`::		JVM stats, memory pool information, garbage collection, buffer pools, number		of loaded/unloaded classes.`os`::		Operating system stats, load average, mem, swap.`plugins`::		Details about the installed plugins and modules per node. The following		information are available for each plugin and module:+---		* `name`: plugin name		* `version`: version of Elasticsearch the plugin was built for		* `description`: short description of the plugin's purpose		* `classname`: fully-qualified class name of the plugin's entry point		* `has_native_controller`: whether or not the plugin has a native controller		process---`process`::		Process statistics, memory consumption, cpu usage, open file descriptors.`settings`::`thread_pool`::		Statistics about each thread pool, including current size, queue and		rejected tasks`transport`::		Transport statistics about sent and received bytes in cluster communication.--include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=node-id][[cluster-nodes-info-api-response-body]]==== {api-response-body-title}`build_hash`::		Short hash of the last git commit in this release.`host`::		The node's host name.`ip`::		The node's IP address.`name`::		The node's name.`total_indexing_buffer`::		Total heap allowed to be used to hold recently indexed		documents before they must be written to disk.  This size is		a shared pool across all shards on this node, and is    controlled by <<indexing-buffer,Indexing Buffer settings>>.`total_indexing_buffer_in_bytes`::		Same as `total_indexing_buffer`, but expressed in bytes.`transport_address`::		Host and port where transport HTTP connections are accepted.`version`::		{es} version running on this node.The `os` flag can be set to retrieve information that concern the operatingsystem:`os.refresh_interval_in_millis`::		Refresh interval for the OS statistics`os.name`::		Name of the operating system (ex: Linux, Windows, Mac OS X)`os.arch`::		Name of the JVM architecture (ex: amd64, x86)`os.version`::		Version of the operating system`os.available_processors`::		Number of processors available to the Java virtual machine`os.allocated_processors`::	  The number of processors actually used to calculate thread pool size. This		number can be set with the <<node.processors, `node.processors`>>		setting of a node and defaults to the number of processors reported by		the OS.The `process` flag can be set to retrieve information that concern the currentrunning process:`process.refresh_interval_in_millis`::		Refresh interval for the process statistics`process.id`::		Process identifier (PID)`process.mlockall`::		Indicates if the process address space has been successfully locked in memory[[cluster-nodes-info-api-query-params]]==== {api-query-parms-title}include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms][[cluster-nodes-info-api-example]]==== {api-examples-title}[source,console]--------------------------------------------------# return just processGET /_nodes/process# same as aboveGET /_nodes/_all/process# return just jvm and process of only nodeId1 and nodeId2GET /_nodes/nodeId1,nodeId2/jvm,process# same as aboveGET /_nodes/nodeId1,nodeId2/info/jvm,process# return all the information of only nodeId1 and nodeId2GET /_nodes/nodeId1,nodeId2/_all--------------------------------------------------The `_all` flag can be set to return all the information - or you can omit it.[[cluster-nodes-info-api-example-plugins]]===== Example for plugins metricIf `plugins` is specified, the result will contain details about the installedplugins and modules:[source,console]--------------------------------------------------GET /_nodes/plugins--------------------------------------------------// TEST[setup:node]The API returns the following response:[source,console-result]--------------------------------------------------{  "_nodes": ...  "cluster_name": "elasticsearch",  "nodes": {    "USpTGYaBSIKbgSUJR2Z9lg": {      "name": "node-0",      "transport_address": "192.168.17:9300",      "host": "node-0.elastic.co",      "ip": "192.168.17",      "version": "{version}",      "build_flavor": "{build_flavor}",      "build_type": "{build_type}",      "build_hash": "587409e",      "roles": [        "master",        "data",        "ingest"      ],      "attributes": {},      "plugins": [        {          "name": "analysis-icu",          "version": "{version}",          "description": "The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.",          "classname": "org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin",          "has_native_controller": false        }      ],      "modules": [        {          "name": "lang-painless",          "version": "{version}",          "description": "An easy, safe and fast scripting language for Elasticsearch",          "classname": "org.elasticsearch.painless.PainlessPlugin",          "has_native_controller": false        }      ]    }  }}--------------------------------------------------// TESTRESPONSE[s/"_nodes": \.\.\./"_nodes": $body.$_path,/]// TESTRESPONSE[s/"elasticsearch"/$body.cluster_name/]// TESTRESPONSE[s/"USpTGYaBSIKbgSUJR2Z9lg"/\$node_name/]// TESTRESPONSE[s/"name": "node-0"/"name": $body.$_path/]// TESTRESPONSE[s/"transport_address": "192.168.17:9300"/"transport_address": $body.$_path/]// TESTRESPONSE[s/"host": "node-0.elastic.co"/"host": $body.$_path/]// TESTRESPONSE[s/"ip": "192.168.17"/"ip": $body.$_path/]// TESTRESPONSE[s/"build_hash": "587409e"/"build_hash": $body.$_path/]// TESTRESPONSE[s/"roles": \[[^\]]*\]/"roles": $body.$_path/]// TESTRESPONSE[s/"attributes": \{[^\}]*\}/"attributes": $body.$_path/]// TESTRESPONSE[s/"plugins": \[[^\]]*\]/"plugins": $body.$_path/]// TESTRESPONSE[s/"modules": \[[^\]]*\]/"modules": $body.$_path/][[cluster-nodes-info-api-example-ingest]]===== Example for ingest metricIf `ingest` is specified, the response contains details about the availableprocessors per node:[source,console]--------------------------------------------------GET /_nodes/ingest--------------------------------------------------// TEST[setup:node]The API returns the following response:[source,console-result]--------------------------------------------------{  "_nodes": ...  "cluster_name": "elasticsearch",  "nodes": {    "USpTGYaBSIKbgSUJR2Z9lg": {      "name": "node-0",      "transport_address": "192.168.17:9300",      "host": "node-0.elastic.co",      "ip": "192.168.17",      "version": "{version}",      "build_flavor": "{build_flavor}",      "build_type": "{build_type}",      "build_hash": "587409e",      "roles": [],      "attributes": {},      "ingest": {        "processors": [          {            "type": "date"          },          {            "type": "uppercase"          },          {            "type": "set"          },          {            "type": "lowercase"          },          {            "type": "gsub"          },          {            "type": "convert"          },          {            "type": "remove"          },          {            "type": "fail"          },          {            "type": "foreach"          },          {            "type": "split"          },          {            "type": "trim"          },          {            "type": "rename"          },          {            "type": "join"          },          {            "type": "append"          }        ]      }    }  }}--------------------------------------------------// TESTRESPONSE[s/"_nodes": \.\.\./"_nodes": $body.$_path,/]// TESTRESPONSE[s/"elasticsearch"/$body.cluster_name/]// TESTRESPONSE[s/"USpTGYaBSIKbgSUJR2Z9lg"/\$node_name/]// TESTRESPONSE[s/"name": "node-0"/"name": $body.$_path/]// TESTRESPONSE[s/"transport_address": "192.168.17:9300"/"transport_address": $body.$_path/]// TESTRESPONSE[s/"host": "node-0.elastic.co"/"host": $body.$_path/]// TESTRESPONSE[s/"ip": "192.168.17"/"ip": $body.$_path/]// TESTRESPONSE[s/"build_hash": "587409e"/"build_hash": $body.$_path/]// TESTRESPONSE[s/"roles": \[[^\]]*\]/"roles": $body.$_path/]// TESTRESPONSE[s/"attributes": \{[^\}]*\}/"attributes": $body.$_path/]// TESTRESPONSE[s/"processors": \[[^\]]*\]/"processors": $body.$_path/]
 |