nodes-stats.asciidoc 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. `clear`::
  47. Clears all the flags (first). Useful, if you only want to
  48. retrieve specific stats.
  49. [source,js]
  50. --------------------------------------------------
  51. # return indices and os
  52. curl -XGET 'http://localhost:9200/_nodes/stats/os'
  53. # return just os and process
  54. curl -XGET 'http://localhost:9200/_nodes/stats/os,process'
  55. # specific type endpoint
  56. curl -XGET 'http://localhost:9200/_nodes/stats/process'
  57. curl -XGET 'http://localhost:9200/_nodes/10.0.0.1/stats/process'
  58. --------------------------------------------------
  59. The `all` flag can be set to return all the stats.
  60. [float]
  61. [[field-data]]
  62. === Field data statistics
  63. You can get information about field data memory usage on node
  64. level or on index level.
  65. [source,js]
  66. --------------------------------------------------
  67. # Node Stats
  68. curl localhost:9200/_nodes/stats/indices/field1,field2?pretty
  69. # Indices Stat
  70. curl localhost:9200/_stats/fielddata/field1,field2?pretty
  71. # You can use wildcards for field names
  72. curl localhost:9200/_stats/fielddata/field*?pretty
  73. curl localhost:9200/_nodes/stats/indices/field*?pretty
  74. --------------------------------------------------