troubleshooting-shards-capacity.asciidoc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. // tag::non-frozen-nodes-cloud[]
  2. **Use {kib}**
  3. //tag::kibana-api-ex[]
  4. . Log in to the {ess-console}[{ecloud} console].
  5. +
  6. . On the **Elasticsearch Service** panel, click the name of your deployment.
  7. +
  8. NOTE: If the name of your deployment is disabled your {kib} instances might be
  9. unhealthy, in which case please contact https://support.elastic.co[Elastic Support].
  10. If your deployment doesn't include {kib}, all you need to do is
  11. {cloud}/ec-access-kibana.html[enable it first].
  12. . Open your deployment's side navigation menu (placed under the Elastic logo in the upper left corner)
  13. and go to **Dev Tools > Console**.
  14. +
  15. [role="screenshot"]
  16. image::images/kibana-console.png[{kib} Console,align="center"]
  17. +
  18. . Check the current status of the cluster according the shards capacity indicator:
  19. +
  20. [source,console]
  21. ----
  22. GET _health_report/shards_capacity
  23. ----
  24. +
  25. The response will look like this:
  26. +
  27. [source,console-result]
  28. ----
  29. {
  30. "cluster_name": "...",
  31. "indicators": {
  32. "shards_capacity": {
  33. "status": "yellow",
  34. "symptom": "Cluster is close to reaching the configured maximum number of shards for data nodes.",
  35. "details": {
  36. "data": {
  37. "max_shards_in_cluster": 1000, <1>
  38. "current_used_shards": 988 <2>
  39. },
  40. "frozen": {
  41. "max_shards_in_cluster": 3000,
  42. "current_used_shards": 0
  43. }
  44. },
  45. "impacts": [
  46. ...
  47. ],
  48. "diagnosis": [
  49. ...
  50. }
  51. }
  52. }
  53. ----
  54. // TESTRESPONSE[skip:the result is for illustrating purposes only]
  55. +
  56. <1> Current value of the setting `cluster.max_shards_per_node`
  57. <2> Current number of open shards across the cluster
  58. +
  59. . Update the <<cluster-max-shards-per-node,`cluster.max_shards_per_node`>> setting with a proper value:
  60. +
  61. [source,console]
  62. ----
  63. PUT _cluster/settings
  64. {
  65. "persistent" : {
  66. "cluster.max_shards_per_node": 1200
  67. }
  68. }
  69. ----
  70. +
  71. This increase should only be temporary. As a long-term solution, we recommend
  72. you add nodes to the oversharded data tier or
  73. <<reduce-cluster-shard-count,reduce your cluster's shard count>> on nodes that do not belong
  74. to the frozen tier.
  75. . To verify that the change has fixed the issue, you can get the current
  76. status of the `shards_capacity` indicator by checking the `data` section of the
  77. <<health-api-example,health API>>:
  78. +
  79. [source,console]
  80. ----
  81. GET _health_report/shards_capacity
  82. ----
  83. +
  84. The response will look like this:
  85. +
  86. [source,console-result]
  87. ----
  88. {
  89. "cluster_name": "...",
  90. "indicators": {
  91. "shards_capacity": {
  92. "status": "green",
  93. "symptom": "The cluster has enough room to add new shards.",
  94. "details": {
  95. "data": {
  96. "max_shards_in_cluster": 1000
  97. },
  98. "frozen": {
  99. "max_shards_in_cluster": 3000
  100. }
  101. }
  102. }
  103. }
  104. }
  105. ----
  106. // TESTRESPONSE[skip:the result is for illustrating purposes only]
  107. . When a long-term solution is in place, we recommend you reset the
  108. `cluster.max_shards_per_node` limit.
  109. +
  110. [source,console]
  111. ----
  112. PUT _cluster/settings
  113. {
  114. "persistent" : {
  115. "cluster.max_shards_per_node": null
  116. }
  117. }
  118. ----
  119. // end::non-frozen-nodes-cloud[]
  120. // tag::non-frozen-nodes-self-managed[]
  121. Check the current status of the cluster according the shards capacity indicator:
  122. [source,console]
  123. ----
  124. GET _health_report/shards_capacity
  125. ----
  126. The response will look like this:
  127. [source,console-result]
  128. ----
  129. {
  130. "cluster_name": "...",
  131. "indicators": {
  132. "shards_capacity": {
  133. "status": "yellow",
  134. "symptom": "Cluster is close to reaching the configured maximum number of shards for data nodes.",
  135. "details": {
  136. "data": {
  137. "max_shards_in_cluster": 1000, <1>
  138. "current_used_shards": 988 <2>
  139. },
  140. "frozen": {
  141. "max_shards_in_cluster": 3000
  142. }
  143. },
  144. "impacts": [
  145. ...
  146. ],
  147. "diagnosis": [
  148. ...
  149. }
  150. }
  151. }
  152. ----
  153. // TESTRESPONSE[skip:the result is for illustrating purposes only]
  154. <1> Current value of the setting `cluster.max_shards_per_node`
  155. <2> Current number of open shards across the cluster
  156. Using the <<cluster-update-settings,`cluster settings API`>>, update the
  157. <<cluster-max-shards-per-node,`cluster.max_shards_per_node`>> setting:
  158. [source,console]
  159. ----
  160. PUT _cluster/settings
  161. {
  162. "persistent" : {
  163. "cluster.max_shards_per_node": 1200
  164. }
  165. }
  166. ----
  167. This increase should only be temporary. As a long-term solution, we recommend
  168. you add nodes to the oversharded data tier or
  169. <<reduce-cluster-shard-count,reduce your cluster's shard count>> on nodes that do not belong
  170. to the frozen tier. To verify that the change has fixed the issue, you can get the current
  171. status of the `shards_capacity` indicator by checking the `data` section of the
  172. <<health-api-example,health API>>:
  173. [source,console]
  174. ----
  175. GET _health_report/shards_capacity
  176. ----
  177. The response will look like this:
  178. [source,console-result]
  179. ----
  180. {
  181. "cluster_name": "...",
  182. "indicators": {
  183. "shards_capacity": {
  184. "status": "green",
  185. "symptom": "The cluster has enough room to add new shards.",
  186. "details": {
  187. "data": {
  188. "max_shards_in_cluster": 1200
  189. },
  190. "frozen": {
  191. "max_shards_in_cluster": 3000
  192. }
  193. }
  194. }
  195. }
  196. }
  197. ----
  198. // TESTRESPONSE[skip:the result is for illustrating purposes only]
  199. When a long-term solution is in place, we recommend you reset the
  200. `cluster.max_shards_per_node` limit.
  201. [source,console]
  202. ----
  203. PUT _cluster/settings
  204. {
  205. "persistent" : {
  206. "cluster.max_shards_per_node": null
  207. }
  208. }
  209. ----
  210. // end::non-frozen-nodes-self-managed[]
  211. // tag::frozen-nodes-cloud[]
  212. **Use {kib}**
  213. //tag::kibana-api-ex[]
  214. . Log in to the {ess-console}[{ecloud} console].
  215. +
  216. . On the **Elasticsearch Service** panel, click the name of your deployment.
  217. +
  218. NOTE: If the name of your deployment is disabled your {kib} instances might be
  219. unhealthy, in which case please contact https://support.elastic.co[Elastic Support].
  220. If your deployment doesn't include {kib}, all you need to do is
  221. {cloud}/ec-access-kibana.html[enable it first].
  222. . Open your deployment's side navigation menu (placed under the Elastic logo in the upper left corner)
  223. and go to **Dev Tools > Console**.
  224. +
  225. [role="screenshot"]
  226. image::images/kibana-console.png[{kib} Console,align="center"]
  227. . Check the current status of the cluster according the shards capacity indicator:
  228. +
  229. [source,console]
  230. ----
  231. GET _health_report/shards_capacity
  232. ----
  233. +
  234. The response will look like this:
  235. +
  236. [source,console-result]
  237. ----
  238. {
  239. "cluster_name": "...",
  240. "indicators": {
  241. "shards_capacity": {
  242. "status": "yellow",
  243. "symptom": "Cluster is close to reaching the configured maximum number of shards for frozen nodes.",
  244. "details": {
  245. "data": {
  246. "max_shards_in_cluster": 1000
  247. },
  248. "frozen": {
  249. "max_shards_in_cluster": 3000, <1>
  250. "current_used_shards": 2998 <2>
  251. }
  252. },
  253. "impacts": [
  254. ...
  255. ],
  256. "diagnosis": [
  257. ...
  258. }
  259. }
  260. }
  261. ----
  262. // TESTRESPONSE[skip:the result is for illustrating purposes only]
  263. <1> Current value of the setting `cluster.max_shards_per_node.frozen`
  264. <2> Current number of open shards used by frozen nodes across the cluster
  265. +
  266. . Update the <<cluster-max-shards-per-node-frozen,`cluster.max_shards_per_node.frozen`>> setting:
  267. +
  268. [source,console]
  269. ----
  270. PUT _cluster/settings
  271. {
  272. "persistent" : {
  273. "cluster.max_shards_per_node.frozen": 3200
  274. }
  275. }
  276. ----
  277. +
  278. This increase should only be temporary. As a long-term solution, we recommend
  279. you add nodes to the oversharded data tier or
  280. <<reduce-cluster-shard-count,reduce your cluster's shard count>> on nodes that belong
  281. to the frozen tier.
  282. . To verify that the change has fixed the issue, you can get the current
  283. status of the `shards_capacity` indicator by checking the `data` section of the
  284. <<health-api-example,health API>>:
  285. +
  286. [source,console]
  287. ----
  288. GET _health_report/shards_capacity
  289. ----
  290. +
  291. The response will look like this:
  292. +
  293. [source,console-result]
  294. ----
  295. {
  296. "cluster_name": "...",
  297. "indicators": {
  298. "shards_capacity": {
  299. "status": "green",
  300. "symptom": "The cluster has enough room to add new shards.",
  301. "details": {
  302. "data": {
  303. "max_shards_in_cluster": 1000
  304. },
  305. "frozen": {
  306. "max_shards_in_cluster": 3200
  307. }
  308. }
  309. }
  310. }
  311. }
  312. ----
  313. // TESTRESPONSE[skip:the result is for illustrating purposes only]
  314. +
  315. . When a long-term solution is in place, we recommend you reset the
  316. `cluster.max_shards_per_node.frozen` limit.
  317. +
  318. [source,console]
  319. ----
  320. PUT _cluster/settings
  321. {
  322. "persistent" : {
  323. "cluster.max_shards_per_node.frozen": null
  324. }
  325. }
  326. ----
  327. // end::frozen-nodes-cloud[]
  328. // tag::frozen-nodes-self-managed[]
  329. Check the current status of the cluster according the shards capacity indicator:
  330. [source,console]
  331. ----
  332. GET _health_report/shards_capacity
  333. ----
  334. [source,console-result]
  335. ----
  336. {
  337. "cluster_name": "...",
  338. "indicators": {
  339. "shards_capacity": {
  340. "status": "yellow",
  341. "symptom": "Cluster is close to reaching the configured maximum number of shards for frozen nodes.",
  342. "details": {
  343. "data": {
  344. "max_shards_in_cluster": 1000
  345. },
  346. "frozen": {
  347. "max_shards_in_cluster": 3000, <1>
  348. "current_used_shards": 2998 <2>
  349. }
  350. },
  351. "impacts": [
  352. ...
  353. ],
  354. "diagnosis": [
  355. ...
  356. }
  357. }
  358. }
  359. ----
  360. // TESTRESPONSE[skip:the result is for illustrating purposes only]
  361. <1> Current value of the setting `cluster.max_shards_per_node.frozen`.
  362. <2> Current number of open shards used by frozen nodes across the cluster.
  363. Using the <<cluster-update-settings,`cluster settings API`>>, update the
  364. <<cluster-max-shards-per-node-frozen,`cluster.max_shards_per_node.frozen`>> setting:
  365. [source,console]
  366. ----
  367. PUT _cluster/settings
  368. {
  369. "persistent" : {
  370. "cluster.max_shards_per_node.frozen": 3200
  371. }
  372. }
  373. ----
  374. This increase should only be temporary. As a long-term solution, we recommend
  375. you add nodes to the oversharded data tier or
  376. <<reduce-cluster-shard-count,reduce your cluster's shard count>> on nodes that belong
  377. to the frozen tier. To verify that the change has fixed the issue, you can get the current
  378. status of the `shards_capacity` indicator by checking the `data` section of the
  379. <<health-api-example,health API>>:
  380. [source,console]
  381. ----
  382. GET _health_report/shards_capacity
  383. ----
  384. The response will look like this:
  385. [source,console-result]
  386. ----
  387. {
  388. "cluster_name": "...",
  389. "indicators": {
  390. "shards_capacity": {
  391. "status": "green",
  392. "symptom": "The cluster has enough room to add new shards.",
  393. "details": {
  394. "data": {
  395. "max_shards_in_cluster": 1000
  396. },
  397. "frozen": {
  398. "max_shards_in_cluster": 3200
  399. }
  400. }
  401. }
  402. }
  403. }
  404. ----
  405. // TESTRESPONSE[skip:the result is for illustrating purposes only]
  406. When a long-term solution is in place, we recommend you reset the
  407. `cluster.max_shards_per_node.frozen` limit.
  408. [source,console]
  409. ----
  410. PUT _cluster/settings
  411. {
  412. "persistent" : {
  413. "cluster.max_shards_per_node.frozen": null
  414. }
  415. }
  416. ----
  417. // end::frozen-nodes-self-managed[]