get-autoscaling-capacity.asciidoc 5.4 KB

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