nodes-info.asciidoc 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. [[cluster-nodes-info]]
  2. == Nodes Info
  3. The cluster nodes info API allows to retrieve one or more (or all) of
  4. the cluster nodes information.
  5. [source,js]
  6. --------------------------------------------------
  7. curl -XGET 'http://localhost:9200/_nodes'
  8. curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2'
  9. --------------------------------------------------
  10. The first command retrieves information of all the nodes in the cluster.
  11. The second command selectively retrieves nodes information of only
  12. `nodeId1` and `nodeId2`. All the nodes selective options are explained
  13. <<cluster-nodes,here>>.
  14. By default, it just returns all attributes and core settings for a node.
  15. It also allows to get only information on `settings`, `os`, `process`, `jvm`,
  16. `thread_pool`, `network`, `transport`, `http` and `plugin`:
  17. [source,js]
  18. --------------------------------------------------
  19. curl -XGET 'http://localhost:9200/_nodes/process'
  20. curl -XGET 'http://localhost:9200/_nodes/_all/process'
  21. curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/jvm,process'
  22. # same as above
  23. curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/info/jvm,process'
  24. curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/_all
  25. --------------------------------------------------
  26. The `all` flag can be set to return all the information - or you can simply omit it.
  27. `plugin` - if set, the result will contain details about the loaded
  28. plugins per node:
  29. * `name`: plugin name
  30. * `description`: plugin description if any
  31. * `site`: `true` if the plugin is a site plugin
  32. * `jvm`: `true` if the plugin is a plugin running in the JVM
  33. * `url`: URL if the plugin is a site plugin
  34. The result will look similar to:
  35. [source,js]
  36. --------------------------------------------------
  37. {
  38. "ok" : true,
  39. "cluster_name" : "test-cluster-MacBook-Air-de-David.local",
  40. "nodes" : {
  41. "hJLXmY_NTrCytiIMbX4_1g" : {
  42. "name" : "node4",
  43. "transport_address" : "inet[/172.18.58.139:9303]",
  44. "hostname" : "MacBook-Air-de-David.local",
  45. "version" : "0.90.0.Beta2-SNAPSHOT",
  46. "http_address" : "inet[/172.18.58.139:9203]",
  47. "plugins" : [ {
  48. "name" : "test-plugin",
  49. "description" : "test-plugin description",
  50. "site" : true,
  51. "jvm" : false
  52. }, {
  53. "name" : "test-no-version-plugin",
  54. "description" : "test-no-version-plugin description",
  55. "site" : true,
  56. "jvm" : false
  57. }, {
  58. "name" : "dummy",
  59. "description" : "No description found for dummy.",
  60. "url" : "/_plugin/dummy/",
  61. "site" : false,
  62. "jvm" : true
  63. } ]
  64. }
  65. }
  66. }
  67. --------------------------------------------------
  68. if your `plugin` data is subject to change use
  69. `plugins.info_refresh_interval` to change or disable the caching
  70. interval:
  71. [source,js]
  72. --------------------------------------------------
  73. # Change cache to 20 seconds
  74. plugins.info_refresh_interval: 20s
  75. # Infinite cache
  76. plugins.info_refresh_interval: -1
  77. # Disable cache
  78. plugins.info_refresh_interval: 0
  79. --------------------------------------------------