stats.asciidoc 4.3 KB

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