stats.asciidoc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. "version_map_memory": "0b",
  88. "version_map_memory_in_bytes": 0,
  89. "fixed_bit_set": "0b",
  90. "fixed_bit_set_memory_in_bytes": 0,
  91. "file_sizes": {}
  92. },
  93. "percolator": {
  94. "num_queries": 0
  95. }
  96. },
  97. "nodes": {
  98. "count": {
  99. "total": 1,
  100. "data": 1,
  101. "coordinating_only": 0,
  102. "master": 1,
  103. "ingest": 1
  104. },
  105. "versions": [
  106. "{version}"
  107. ],
  108. "os": {
  109. "available_processors": 8,
  110. "allocated_processors": 8,
  111. "names": [
  112. {
  113. "name": "Mac OS X",
  114. "count": 1
  115. }
  116. ]
  117. },
  118. "process": {
  119. "cpu": {
  120. "percent": 9
  121. },
  122. "open_file_descriptors": {
  123. "min": 268,
  124. "max": 268,
  125. "avg": 268
  126. }
  127. },
  128. "jvm": {
  129. "max_uptime": "13.7s",
  130. "max_uptime_in_millis": 13737,
  131. "versions": [
  132. {
  133. "version": "1.8.0_74",
  134. "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
  135. "vm_version": "25.74-b02",
  136. "vm_vendor": "Oracle Corporation",
  137. "count": 1
  138. }
  139. ],
  140. "mem": {
  141. "heap_used": "57.5mb",
  142. "heap_used_in_bytes": 60312664,
  143. "heap_max": "989.8mb",
  144. "heap_max_in_bytes": 1037959168
  145. },
  146. "threads": 90
  147. },
  148. "fs": {
  149. "total": "200.6gb",
  150. "total_in_bytes": 215429193728,
  151. "free": "32.6gb",
  152. "free_in_bytes": 35064553472,
  153. "available": "32.4gb",
  154. "available_in_bytes": 34802409472
  155. },
  156. "plugins": [
  157. // all plugins installed on nodes
  158. {
  159. "name": "analysis-stempel",
  160. "version": "{version}",
  161. "description": "The Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into elasticsearch.",
  162. "classname": "org.elasticsearch.plugin.analysis.stempel.AnalysisStempelPlugin"
  163. }
  164. ]
  165. }
  166. }
  167. --------------------------------------------------