stats.asciidoc 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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": 1439326129256,
  16. "cluster_name": "elasticsearch",
  17. "status": "green",
  18. "indices": {
  19. "count": 3,
  20. "shards": {
  21. "total": 35,
  22. "primaries": 15,
  23. "replication": 1.333333333333333,
  24. "index": {
  25. "shards": {
  26. "min": 10,
  27. "max": 15,
  28. "avg": 11.66666666666666
  29. },
  30. "primaries": {
  31. "min": 5,
  32. "max": 5,
  33. "avg": 5
  34. },
  35. "replication": {
  36. "min": 1,
  37. "max": 2,
  38. "avg": 1.3333333333333333
  39. }
  40. }
  41. },
  42. "docs": {
  43. "count": 2,
  44. "deleted": 0
  45. },
  46. "store": {
  47. "size": "5.6kb",
  48. "size_in_bytes": 5770,
  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. "filter_cache": {
  58. "memory_size": "0b",
  59. "memory_size_in_bytes": 0,
  60. "evictions": 0
  61. },
  62. "id_cache": {
  63. "memory_size": "0b",
  64. "memory_size_in_bytes": 0
  65. },
  66. "completion": {
  67. "size": "0b",
  68. "size_in_bytes": 0
  69. },
  70. "segments": {
  71. "count": 2,
  72. "memory": "6.4kb",
  73. "memory_in_bytes": 6596,
  74. "index_writer_memory": "0b",
  75. "index_writer_memory_in_bytes": 0,
  76. "index_writer_max_memory": "275.7mb",
  77. "index_writer_max_memory_in_bytes": 289194639,
  78. "version_map_memory": "0b",
  79. "version_map_memory_in_bytes": 0,
  80. "fixed_bit_set": "0b",
  81. "fixed_bit_set_memory_in_bytes": 0
  82. },
  83. "percolate": {
  84. "total": 0,
  85. "get_time": "0s",
  86. "time_in_millis": 0,
  87. "current": 0,
  88. "memory_size_in_bytes": -1,
  89. "memory_size": "-1b",
  90. "queries": 0
  91. }
  92. },
  93. "nodes": {
  94. "count": {
  95. "total": 2,
  96. "master_only": 0,
  97. "data_only": 0,
  98. "master_data": 2,
  99. "client": 0
  100. },
  101. "versions": [
  102. "{version}"
  103. ],
  104. "os": {
  105. "available_processors": 4,
  106. "mem": {
  107. "total": "8gb",
  108. "total_in_bytes": 8589934592
  109. },
  110. "names": [
  111. {
  112. "name": "Mac OS X",
  113. "count": 1
  114. }
  115. ],
  116. "cpu": [
  117. {
  118. "vendor": "Intel",
  119. "model": "MacBookAir5,2",
  120. "mhz": 2000,
  121. "total_cores": 4,
  122. "total_sockets": 4,
  123. "cores_per_socket": 16,
  124. "cache_size": "256b",
  125. "cache_size_in_bytes": 256,
  126. "count": 1
  127. }
  128. ]
  129. },
  130. "process": {
  131. "cpu": {
  132. "percent": 3
  133. },
  134. "open_file_descriptors": {
  135. "min": 200,
  136. "max": 346,
  137. "avg": 273
  138. }
  139. },
  140. "jvm": {
  141. "max_uptime": "24s",
  142. "max_uptime_in_millis": 24054,
  143. "versions": [
  144. {
  145. "version": "1.6.0_45",
  146. "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
  147. "vm_version": "20.45-b01-451",
  148. "vm_vendor": "Apple Inc.",
  149. "count": 2
  150. }
  151. ],
  152. "mem": {
  153. "heap_used": "38.3mb",
  154. "heap_used_in_bytes": 40237120,
  155. "heap_max": "1.9gb",
  156. "heap_max_in_bytes": 2130051072
  157. },
  158. "threads": 89
  159. },
  160. "fs":
  161. {
  162. "total": "232.9gb",
  163. "total_in_bytes": 250140434432,
  164. "free": "31.3gb",
  165. "free_in_bytes": 33705881600,
  166. "available": "31.1gb",
  167. "available_in_bytes": 33443737600,
  168. "disk_reads": 21202753,
  169. "disk_writes": 27028840,
  170. "disk_io_op": 48231593,
  171. "disk_read_size": "528gb",
  172. "disk_read_size_in_bytes": 566980806656,
  173. "disk_write_size": "617.9gb",
  174. "disk_write_size_in_bytes": 663525366784,
  175. "disk_io_size": "1145.9gb",
  176. "disk_io_size_in_bytes": 1230506173440
  177. },
  178. "plugins": [
  179. // all plugins installed on nodes
  180. {
  181. "name": "inquisitor",
  182. "description": "",
  183. "url": "/_plugin/inquisitor/",
  184. "jvm": false,
  185. "site": true
  186. }
  187. ]
  188. }
  189. }
  190. --------------------------------------------------