nodes-info.asciidoc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 `plugins`:
  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. `plugins` - 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. "cluster_name" : "test-cluster-MacBook-Air-de-David.local",
  39. "nodes" : {
  40. "hJLXmY_NTrCytiIMbX4_1g" : {
  41. "name" : "node4",
  42. "transport_address" : "inet[/172.18.58.139:9303]",
  43. "hostname" : "MacBook-Air-de-David.local",
  44. "version" : "0.90.0.Beta2-SNAPSHOT",
  45. "http_address" : "inet[/172.18.58.139:9203]",
  46. "plugins" : [ {
  47. "name" : "test-plugin",
  48. "description" : "test-plugin description",
  49. "site" : true,
  50. "jvm" : false
  51. }, {
  52. "name" : "test-no-version-plugin",
  53. "description" : "test-no-version-plugin description",
  54. "site" : true,
  55. "jvm" : false
  56. }, {
  57. "name" : "dummy",
  58. "description" : "No description found for dummy.",
  59. "url" : "/_plugin/dummy/",
  60. "site" : false,
  61. "jvm" : true
  62. } ]
  63. }
  64. }
  65. }
  66. --------------------------------------------------
  67. if your `plugin` data is subject to change use
  68. `plugins.info_refresh_interval` to change or disable the caching
  69. interval:
  70. [source,js]
  71. --------------------------------------------------
  72. # Change cache to 20 seconds
  73. plugins.info_refresh_interval: 20s
  74. # Infinite cache
  75. plugins.info_refresh_interval: -1
  76. # Disable cache
  77. plugins.info_refresh_interval: 0
  78. --------------------------------------------------