nodes-info.asciidoc 3.0 KB

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