nodes-stats.asciidoc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. [[cluster-nodes-stats]]
  2. == Nodes Stats
  3. [float]
  4. === Nodes statistics
  5. The cluster nodes stats API allows to retrieve one or more (or all) of
  6. the cluster nodes statistics.
  7. [source,js]
  8. --------------------------------------------------
  9. curl -XGET 'http://localhost:9200/_nodes/stats'
  10. curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/stats'
  11. --------------------------------------------------
  12. The first command retrieves stats of all the nodes in the cluster. The
  13. second command selectively retrieves nodes stats of only `nodeId1` and
  14. `nodeId2`. All the nodes selective options are explained
  15. <<cluster-nodes,here>>.
  16. By default, all stats are returned. You can limit this by combining any
  17. of `indices`, `os`, `process`, `jvm`, `network`, `transport`, `http`,
  18. `fs`, `breaker` and `thread_pool`. For example:
  19. [horizontal]
  20. `indices`::
  21. Indices stats about size, document count, indexing and
  22. deletion times, search times, field cache size , merges and flushes
  23. `fs`::
  24. File system information, data path, free disk space, read/write
  25. stats
  26. `http`::
  27. HTTP connection information
  28. `jvm`::
  29. JVM stats, memory pool information, garbage collection, buffer
  30. pools
  31. `network`::
  32. TCP information
  33. `os`::
  34. Operating system stats, load average, cpu, mem, swap
  35. `process`::
  36. Process statistics, memory consumption, cpu usage, open
  37. file descriptors
  38. `thread_pool`::
  39. Statistics about each thread pool, including current
  40. size, queue and rejected tasks
  41. `transport`::
  42. Transport statistics about sent and received bytes in
  43. cluster communication
  44. `breaker`::
  45. Statistics about the field data circuit breaker
  46. [source,js]
  47. --------------------------------------------------
  48. # return indices and os
  49. curl -XGET 'http://localhost:9200/_nodes/stats/os'
  50. # return just os and process
  51. curl -XGET 'http://localhost:9200/_nodes/stats/os,process'
  52. # specific type endpoint
  53. curl -XGET 'http://localhost:9200/_nodes/stats/process'
  54. curl -XGET 'http://localhost:9200/_nodes/10.0.0.1/stats/process'
  55. --------------------------------------------------
  56. The `all` flag can be set to return all the stats.
  57. [float]
  58. [[field-data]]
  59. === Field data statistics
  60. You can get information about field data memory usage on node
  61. level or on index level.
  62. [source,js]
  63. --------------------------------------------------
  64. # Node Stats
  65. curl localhost:9200/_nodes/stats/indices/?fields=field1,field2?pretty
  66. # Indices Stat
  67. curl localhost:9200/_stats/fielddata/?fields=field1,field2?pretty
  68. # You can use wildcards for field names
  69. curl localhost:9200/_stats/fielddata/?fields=field*?pretty
  70. curl localhost:9200/_nodes/stats/indices/?fields=field*?pretty
  71. --------------------------------------------------
  72. [float]
  73. [[search-groups]]
  74. === Search groups
  75. You can get statistics about search groups for searches executed
  76. on this node.
  77. [source,js]
  78. --------------------------------------------------
  79. # All groups with all stats
  80. curl localhost:9200/_nodes/stats?pretty&groups=_all
  81. # Some groups from just the indices stats
  82. curl localhost:9200/_nodes/stats/indices?pretty&groups=foo,bar
  83. --------------------------------------------------