stats.asciidoc 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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. "mem" : {
  118. "total" : "16gb",
  119. "total_in_bytes" : 17179869184,
  120. "free" : "78.1mb",
  121. "free_in_bytes" : 81960960,
  122. "used" : "15.9gb",
  123. "used_in_bytes" : 17097908224,
  124. "free_percent" : 0,
  125. "used_percent" : 100
  126. }
  127. },
  128. "process": {
  129. "cpu": {
  130. "percent": 9
  131. },
  132. "open_file_descriptors": {
  133. "min": 268,
  134. "max": 268,
  135. "avg": 268
  136. }
  137. },
  138. "jvm": {
  139. "max_uptime": "13.7s",
  140. "max_uptime_in_millis": 13737,
  141. "versions": [
  142. {
  143. "version": "1.8.0_74",
  144. "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
  145. "vm_version": "25.74-b02",
  146. "vm_vendor": "Oracle Corporation",
  147. "count": 1
  148. }
  149. ],
  150. "mem": {
  151. "heap_used": "57.5mb",
  152. "heap_used_in_bytes": 60312664,
  153. "heap_max": "989.8mb",
  154. "heap_max_in_bytes": 1037959168
  155. },
  156. "threads": 90
  157. },
  158. "fs": {
  159. "total": "200.6gb",
  160. "total_in_bytes": 215429193728,
  161. "free": "32.6gb",
  162. "free_in_bytes": 35064553472,
  163. "available": "32.4gb",
  164. "available_in_bytes": 34802409472
  165. },
  166. "plugins": [
  167. {
  168. "name": "analysis-icu",
  169. "version": "{version}",
  170. "description": "The ICU Analysis plugin integrates Lucene ICU module into elasticsearch, adding ICU relates analysis components.",
  171. "classname": "org.elasticsearch.plugin.analysis.icu.AnalysisICUPlugin",
  172. "has_native_controller": false
  173. },
  174. {
  175. "name": "ingest-geoip",
  176. "version": "{version}",
  177. "description": "Ingest processor that uses looksup geo data based on ip adresses using the Maxmind geo database",
  178. "classname": "org.elasticsearch.ingest.geoip.IngestGeoIpPlugin",
  179. "has_native_controller": false
  180. },
  181. {
  182. "name": "ingest-user-agent",
  183. "version": "{version}",
  184. "description": "Ingest processor that extracts information from a user agent",
  185. "classname": "org.elasticsearch.ingest.useragent.IngestUserAgentPlugin",
  186. "has_native_controller": false
  187. }
  188. ]
  189. }
  190. }
  191. --------------------------------------------------