stats.asciidoc 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. [[cluster-stats]]
  2. == Cluster Stats
  3. added[0.90.8]
  4. The Cluster Stats API allows to retrieve statistics from a cluster wide perspective.
  5. The API returns basic index metrics (shard numbers, store size, memory usage) and
  6. information about the current nodes that form the cluster (number, roles, os, jvm
  7. versions, memory usage, cpu and installed plugins).
  8. [source,js]
  9. --------------------------------------------------
  10. curl -XGET 'http://localhost:9200/_cluster/stats?human'
  11. --------------------------------------------------
  12. Will return, for example:
  13. [source,js]
  14. --------------------------------------------------
  15. {
  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. }
  73. },
  74. "nodes": {
  75. "count": {
  76. "total": 2,
  77. "master_only": 0,
  78. "data_only": 0,
  79. "master_data": 2,
  80. "client": 0
  81. },
  82. "versions": [
  83. "0.90.8"
  84. ],
  85. "os": {
  86. "available_processors": 4,
  87. "mem": {
  88. "total": "8gb",
  89. "total_in_bytes": 8589934592
  90. },
  91. "cpu": [
  92. {
  93. "vendor": "Intel",
  94. "model": "MacBookAir5,2",
  95. "mhz": 2000,
  96. "total_cores": 4,
  97. "total_sockets": 4,
  98. "cores_per_socket": 16,
  99. "cache_size": "256b",
  100. "cache_size_in_bytes": 256,
  101. "count": 1
  102. }
  103. ]
  104. },
  105. "process": {
  106. "cpu": {
  107. "percent": 3
  108. },
  109. "open_file_descriptors": {
  110. "min": 200,
  111. "max": 346,
  112. "avg": 273
  113. }
  114. },
  115. "jvm": {
  116. "max_uptime": "24s",
  117. "max_uptime_in_millis": 24054,
  118. "version": [
  119. {
  120. "version": "1.6.0_45",
  121. "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
  122. "vm_version": "20.45-b01-451",
  123. "vm_vendor": "Apple Inc.",
  124. "count": 2
  125. }
  126. ],
  127. "mem": {
  128. "heap_used": "38.3mb",
  129. "heap_used_in_bytes": 40237120,
  130. "heap_max": "1.9gb",
  131. "heap_max_in_bytes": 2130051072
  132. },
  133. "threads": 89
  134. },
  135. "fs":
  136. {
  137. "total": "232.9gb",
  138. "total_in_bytes": 250140434432,
  139. "free": "31.3gb",
  140. "free_in_bytes": 33705881600,
  141. "available": "31.1gb",
  142. "available_in_bytes": 33443737600,
  143. "disk_reads": 21202753,
  144. "disk_writes": 27028840,
  145. "disk_io_op": 48231593,
  146. "disk_read_size": "528gb",
  147. "disk_read_size_in_bytes": 566980806656,
  148. "disk_write_size": "617.9gb",
  149. "disk_write_size_in_bytes": 663525366784,
  150. "disk_io_size": "1145.9gb",
  151. "disk_io_size_in_bytes": 1230506173440
  152. },
  153. "plugins": [
  154. // all plugins installed on nodes
  155. {
  156. "name": "inquisitor",
  157. "description": "",
  158. "url": "/_plugin/inquisitor/",
  159. "jvm": false,
  160. "site": true
  161. }
  162. ]
  163. }
  164. }
  165. --------------------------------------------------