get-autoscaling-capacity.asciidoc 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. [role="xpack"]
  2. [testenv="enterprise"]
  3. [[autoscaling-get-autoscaling-capacity]]
  4. === Get autoscaling capacity API
  5. ++++
  6. <titleabbrev>Get autoscaling capacity</titleabbrev>
  7. ++++
  8. include::../autoscaling-designed-for-note.asciidoc[]
  9. Get autoscaling capacity.
  10. [[autoscaling-get-autoscaling-capacity-request]]
  11. ==== {api-request-title}
  12. [source,console]
  13. --------------------------------------------------
  14. GET /_autoscaling/capacity/
  15. --------------------------------------------------
  16. // TEST
  17. [[autoscaling-get-autoscaling-capacity-prereqs]]
  18. ==== {api-prereq-title}
  19. * If the {es} {security-features} are enabled, you must have
  20. `manage_autoscaling` cluster privileges. For more information, see
  21. <<security-privileges>>.
  22. [[autoscaling-get-autoscaling-capacity-desc]]
  23. ==== {api-description-title}
  24. This API gets the current autoscaling capacity based on the configured
  25. autoscaling policy. This API will return information to size the cluster
  26. appropriately to the current workload.
  27. The `required_capacity` is calculated as the max of the `required_capacity`
  28. result of all individual deciders that are enabled for the policy.
  29. The operator should verify that the `current_nodes` match
  30. the operator's knowledge of the cluster to avoid making autoscaling decisions
  31. based on stale or incomplete information.
  32. The response contains decider-specific information you can use to diagnose how
  33. and why autoscaling determined a certain capacity was required. This information
  34. is provided for diagnosis only. Do not use this information to make autoscaling
  35. decisions.
  36. [role="child_attributes"]
  37. [[autoscaling-get-autoscaling-capacity-api-response-body]]
  38. ==== {api-response-body-title}
  39. `policies`::
  40. (object)
  41. Contains the map of policy name to capacity result
  42. +
  43. .Properties of `policies`
  44. [%collapsible%open]
  45. ====
  46. `<policy_name>`::
  47. (object)
  48. Contains capacity information for the policy
  49. +
  50. .Properties of `<policy_name>`
  51. [%collapsible%open]
  52. =====
  53. `required_capacity`::
  54. (object)
  55. Contains the required capacity for the policy.
  56. +
  57. .Properties of `required_capacity`
  58. [%collapsible%open]
  59. ======
  60. `node`::
  61. (object)
  62. Contains the minimum node sizes required per node, ensuring that individual
  63. shards or ML jobs can fit into a single node.
  64. +
  65. .Properties of `node`
  66. [%collapsible%open]
  67. =======
  68. `storage`::
  69. (integer)
  70. Bytes of storage required per node.
  71. `memory`::
  72. (integer)
  73. Bytes of memory required per node.
  74. =======
  75. `total`::
  76. (object)
  77. Contains the total size required for the policy.
  78. +
  79. .Properties of `total`
  80. [%collapsible%open]
  81. =======
  82. `storage`::
  83. (integer)
  84. Total bytes of storage required for the policy.
  85. `memory`::
  86. (integer)
  87. Total bytes of memory required for the policy.
  88. =======
  89. ======
  90. `current_capacity`::
  91. (object)
  92. Contains the current capacity for nodes governed by the policy, i.e. the nodes
  93. that {es} bases its calculation on.
  94. +
  95. .Properties of `current_capacity`
  96. [%collapsible%open]
  97. ======
  98. `node`::
  99. (object)
  100. Contains the maximum sizes of nodes governed by the policy.
  101. +
  102. .Properties of `node`
  103. [%collapsible%open]
  104. =======
  105. `storage`::
  106. (integer)
  107. Maximum bytes of storage of a node.
  108. `memory`::
  109. (integer)
  110. Maximum bytes of memory of a node.
  111. =======
  112. `total`::
  113. (object)
  114. Contains the current total storage and memory sizes for nodes governed by the policy.
  115. +
  116. .Properties of `total`
  117. [%collapsible%open]
  118. =======
  119. `storage`::
  120. (integer)
  121. Current bytes of storage available for the policy.
  122. `memory`::
  123. (integer)
  124. Current bytes of memory available for the policy.
  125. =======
  126. ======
  127. `current_nodes`::
  128. (array of objects)
  129. List of nodes used for capacity calculation.
  130. +
  131. .Properties of elements in `current_nodes`
  132. [%collapsible%open]
  133. ======
  134. `name`::
  135. (string)
  136. Name of the node.
  137. ======
  138. `deciders`::
  139. (object)
  140. The capacity results from individual deciders, allowing insight into how the
  141. outer level `required_capacity` was calculated.
  142. +
  143. .Properties of `deciders`
  144. [%collapsible%open]
  145. =======
  146. `<decider_name>`::
  147. (object)
  148. The capacity result for a specific decider enabled for the policy.
  149. +
  150. .Properties of `<decider_name>`
  151. [%collapsible%open]
  152. ========
  153. `required_capacity`::
  154. (object)
  155. Required capacity determined by the decider.
  156. +
  157. .Properties of `required_capacity`
  158. [%collapsible%open]
  159. =========
  160. `node`::
  161. (object)
  162. Contains the minimum node sizes required per node, ensuring that individual
  163. shards or {ml} jobs can fit into a single node.
  164. +
  165. .Properties of `node`
  166. [%collapsible%open]
  167. ==========
  168. `storage`::
  169. (integer)
  170. Bytes of storage required per node.
  171. `memory`::
  172. (integer)
  173. Bytes of memory required per node.
  174. ==========
  175. `total`::
  176. (object)
  177. Contains the total size required for the policy.
  178. +
  179. .Properties of `total`
  180. [%collapsible%open]
  181. ==========
  182. `storage`::
  183. (integer)
  184. Total bytes of storage required for the policy.
  185. `memory`::
  186. (integer)
  187. Total bytes of memory required for the policy.
  188. ==========
  189. =========
  190. `reason_summary`::
  191. (string)
  192. Description of the basis for the decider's result.
  193. `reason_details`::
  194. (object)
  195. A per-decider structure containing details about the basis for the deciders' result.
  196. The contents should not be relied on for application purposes and are not subject
  197. to backwards compatibility guarantees.
  198. ========
  199. =======
  200. =====
  201. ====
  202. [[autoscaling-get-autoscaling-capacity-examples]]
  203. ==== {api-examples-title}
  204. This example retrieves the current autoscaling capacity.
  205. [source,console]
  206. --------------------------------------------------
  207. GET /_autoscaling/capacity
  208. --------------------------------------------------
  209. // TEST
  210. The API returns the following result:
  211. [source,console-result]
  212. --------------------------------------------------
  213. {
  214. policies: {}
  215. }
  216. --------------------------------------------------