stats.asciidoc 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. [[cluster-stats]]
  2. == Cluster Stats
  3. The Cluster Stats API allows to retrieve statistics from a cluster wide perspective.
  4. The API returns basic index metrics (shard numbers, store size, memory usage) and
  5. information about the current nodes that form the cluster (number, roles, os, jvm
  6. versions, memory usage, cpu and installed plugins).
  7. [source,js]
  8. --------------------------------------------------
  9. curl -XGET 'http://localhost:9200/_cluster/stats?human&pretty'
  10. --------------------------------------------------
  11. Will return, for example:
  12. ["source","js",subs="attributes,callouts"]
  13. --------------------------------------------------
  14. {
  15. "timestamp": 1459427693515,
  16. "cluster_name": "elasticsearch",
  17. "status": "green",
  18. "indices": {
  19. "count": 2,
  20. "shards": {
  21. "total": 10,
  22. "primaries": 10,
  23. "replication": 0,
  24. "index": {
  25. "shards": {
  26. "min": 5,
  27. "max": 5,
  28. "avg": 5
  29. },
  30. "primaries": {
  31. "min": 5,
  32. "max": 5,
  33. "avg": 5
  34. },
  35. "replication": {
  36. "min": 0,
  37. "max": 0,
  38. "avg": 0
  39. }
  40. }
  41. },
  42. "docs": {
  43. "count": 10,
  44. "deleted": 0
  45. },
  46. "store": {
  47. "size": "16.2kb",
  48. "size_in_bytes": 16684,
  49. "throttle_time": "0s",
  50. "throttle_time_in_millis": 0
  51. },
  52. "fielddata": {
  53. "memory_size": "0b",
  54. "memory_size_in_bytes": 0,
  55. "evictions": 0
  56. },
  57. "query_cache": {
  58. "memory_size": "0b",
  59. "memory_size_in_bytes": 0,
  60. "total_count": 0,
  61. "hit_count": 0,
  62. "miss_count": 0,
  63. "cache_size": 0,
  64. "cache_count": 0,
  65. "evictions": 0
  66. },
  67. "completion": {
  68. "size": "0b",
  69. "size_in_bytes": 0
  70. },
  71. "segments": {
  72. "count": 4,
  73. "memory": "8.6kb",
  74. "memory_in_bytes": 8898,
  75. "terms_memory": "6.3kb",
  76. "terms_memory_in_bytes": 6522,
  77. "stored_fields_memory": "1.2kb",
  78. "stored_fields_memory_in_bytes": 1248,
  79. "term_vectors_memory": "0b",
  80. "term_vectors_memory_in_bytes": 0,
  81. "norms_memory": "384b",
  82. "norms_memory_in_bytes": 384,
  83. "doc_values_memory": "744b",
  84. "doc_values_memory_in_bytes": 744,
  85. "index_writer_memory": "0b",
  86. "index_writer_memory_in_bytes": 0,
  87. "index_writer_max_memory": "2.5gb",
  88. "index_writer_max_memory_in_bytes": 2684354560,
  89. "version_map_memory": "0b",
  90. "version_map_memory_in_bytes": 0,
  91. "fixed_bit_set": "0b",
  92. "fixed_bit_set_memory_in_bytes": 0,
  93. "file_sizes": {}
  94. },
  95. "percolator": {
  96. "num_queries": 0
  97. }
  98. },
  99. "nodes": {
  100. "count": {
  101. "total": 1,
  102. "data": 1,
  103. "coordinating_only": 0,
  104. "master": 1,
  105. "ingest": 1
  106. },
  107. "versions": [
  108. "{version}"
  109. ],
  110. "os": {
  111. "available_processors": 8,
  112. "allocated_processors": 8,
  113. "names": [
  114. {
  115. "name": "Mac OS X",
  116. "count": 1
  117. }
  118. ]
  119. },
  120. "process": {
  121. "cpu": {
  122. "percent": 9
  123. },
  124. "open_file_descriptors": {
  125. "min": 268,
  126. "max": 268,
  127. "avg": 268
  128. }
  129. },
  130. "jvm": {
  131. "max_uptime": "13.7s",
  132. "max_uptime_in_millis": 13737,
  133. "versions": [
  134. {
  135. "version": "1.8.0_74",
  136. "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
  137. "vm_version": "25.74-b02",
  138. "vm_vendor": "Oracle Corporation",
  139. "count": 1
  140. }
  141. ],
  142. "mem": {
  143. "heap_used": "57.5mb",
  144. "heap_used_in_bytes": 60312664,
  145. "heap_max": "989.8mb",
  146. "heap_max_in_bytes": 1037959168
  147. },
  148. "threads": 90
  149. },
  150. "fs": {
  151. "total": "200.6gb",
  152. "total_in_bytes": 215429193728,
  153. "free": "32.6gb",
  154. "free_in_bytes": 35064553472,
  155. "available": "32.4gb",
  156. "available_in_bytes": 34802409472
  157. },
  158. "plugins": [
  159. // all plugins installed on nodes
  160. {
  161. "name": "analysis-stempel",
  162. "version": "{version}",
  163. "description": "The Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into elasticsearch.",
  164. "classname": "org.elasticsearch.plugin.analysis.stempel.AnalysisStempelPlugin"
  165. }
  166. ]
  167. }
  168. }
  169. --------------------------------------------------