nodes-stats.asciidoc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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/_cluster/nodes/stats'
  10. curl -XGET 'http://localhost:9200/_cluster/nodes/nodeId1,nodeId2/stats'
  11. # simplified
  12. curl -XGET 'http://localhost:9200/_nodes/stats'
  13. curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/stats'
  14. --------------------------------------------------
  15. The first command retrieves stats of all the nodes in the cluster. The
  16. second command selectively retrieves nodes stats of only `nodeId1` and
  17. `nodeId2`. All the nodes selective options are explained
  18. <<cluster-nodes,here>>.
  19. By default, `indices` stats are returned. With options for `indices`,
  20. `os`, `process`, `jvm`, `network`, `transport`, `http`, `fs`, and
  21. `thread_pool`. For example:
  22. [horizontal]
  23. `indices`::
  24. Indices stats about size, document count, indexing and
  25. deletion times, search times, field cache size , merges and flushes
  26. `fs`::
  27. File system information, data path, free disk space, read/write
  28. stats
  29. `http`::
  30. HTTP connection information
  31. `jvm`::
  32. JVM stats, memory pool information, garbage collection, buffer
  33. pools
  34. `network`::
  35. TCP information
  36. `os`::
  37. Operating system stats, load average, cpu, mem, swap
  38. `process`::
  39. Process statistics, memory consumption, cpu usage, open
  40. file descriptors
  41. `thread_pool`::
  42. Statistics about each thread pool, including current
  43. size, queue and rejected tasks
  44. `transport`::
  45. Transport statistics about sent and received bytes in
  46. cluster communication
  47. `clear`::
  48. Clears all the flags (first). Useful, if you only want to
  49. retrieve specific stats.
  50. [source,js]
  51. --------------------------------------------------
  52. # return indices and os
  53. curl -XGET 'http://localhost:9200/_nodes/stats?os=true'
  54. # return just os and process
  55. curl -XGET 'http://localhost:9200/_nodes/stats?clear=true&os=true&process=true'
  56. # specific type endpoint
  57. curl -XGET 'http://localhost:9200/_nodes/process/stats'
  58. curl -XGET 'http://localhost:9200/_nodes/10.0.0.1/process/stats'
  59. # or, if you like the other way
  60. curl -XGET 'http://localhost:9200/_nodes/stats/process'
  61. curl -XGET 'http://localhost:9200/_nodes/10.0.0.1/stats/process'
  62. --------------------------------------------------
  63. The `all` flag can be set to return all the stats.
  64. [float]
  65. === Field data statistics
  66. You can get information about field data memory usage on node
  67. level or on index level.
  68. [source,js]
  69. --------------------------------------------------
  70. # Node Stats
  71. curl localhost:9200/_nodes/stats/indices/fielddata/field1,field2?pretty
  72. # Indices Stat
  73. curl localhost:9200/_stats/fielddata/field1,field2?pretty
  74. # You can use wildcards for field names
  75. curl localhost:9200/_stats/fielddata/field*?pretty
  76. curl localhost:9200/_nodes/stats/indices/fielddata/field*?pretty
  77. --------------------------------------------------