stats.asciidoc 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. "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. "completion": {
  62. "size": "0b",
  63. "size_in_bytes": 0
  64. },
  65. "segments": {
  66. "count": 2
  67. }
  68. },
  69. "nodes": {
  70. "count": {
  71. "total": 2,
  72. "master_only": 0,
  73. "data_only": 0,
  74. "master_data": 2,
  75. "client": 0
  76. },
  77. "versions": [
  78. "{version}"
  79. ],
  80. "os": {
  81. "available_processors": 4,
  82. "mem": {
  83. "total": "8gb",
  84. "total_in_bytes": 8589934592
  85. },
  86. "cpu": [
  87. {
  88. "vendor": "Intel",
  89. "model": "MacBookAir5,2",
  90. "mhz": 2000,
  91. "total_cores": 4,
  92. "total_sockets": 4,
  93. "cores_per_socket": 16,
  94. "cache_size": "256b",
  95. "cache_size_in_bytes": 256,
  96. "count": 1
  97. }
  98. ]
  99. },
  100. "process": {
  101. "cpu": {
  102. "percent": 3
  103. },
  104. "open_file_descriptors": {
  105. "min": 200,
  106. "max": 346,
  107. "avg": 273
  108. }
  109. },
  110. "jvm": {
  111. "max_uptime": "24s",
  112. "max_uptime_in_millis": 24054,
  113. "versions": [
  114. {
  115. "version": "1.6.0_45",
  116. "vm_name": "Java HotSpot(TM) 64-Bit Server VM",
  117. "vm_version": "20.45-b01-451",
  118. "vm_vendor": "Apple Inc.",
  119. "count": 2
  120. }
  121. ],
  122. "mem": {
  123. "heap_used": "38.3mb",
  124. "heap_used_in_bytes": 40237120,
  125. "heap_max": "1.9gb",
  126. "heap_max_in_bytes": 2130051072
  127. },
  128. "threads": 89
  129. },
  130. "fs":
  131. {
  132. "total": "232.9gb",
  133. "total_in_bytes": 250140434432,
  134. "free": "31.3gb",
  135. "free_in_bytes": 33705881600,
  136. "available": "31.1gb",
  137. "available_in_bytes": 33443737600,
  138. "disk_reads": 21202753,
  139. "disk_writes": 27028840,
  140. "disk_io_op": 48231593,
  141. "disk_read_size": "528gb",
  142. "disk_read_size_in_bytes": 566980806656,
  143. "disk_write_size": "617.9gb",
  144. "disk_write_size_in_bytes": 663525366784,
  145. "disk_io_size": "1145.9gb",
  146. "disk_io_size_in_bytes": 1230506173440
  147. },
  148. "plugins": [
  149. // all plugins installed on nodes
  150. {
  151. "name": "inquisitor",
  152. "description": "",
  153. "url": "/_plugin/inquisitor/",
  154. "jvm": false,
  155. "site": true
  156. }
  157. ]
  158. }
  159. }
  160. --------------------------------------------------