{"id":4923,"date":"2022-03-08T14:46:50","date_gmt":"2022-03-08T05:46:50","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=4923"},"modified":"2022-03-08T15:40:47","modified_gmt":"2022-03-08T06:40:47","slug":"elasticsearch-index-lifecycle-policies","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=4923","title":{"rendered":"Elasticsearch &#8211; Index Lifecycle Policies"},"content":{"rendered":"<h1>Elasticsearch &#8211; Index Lifecycle Policies<\/h1>\n<p>\ub85c\uadf8\ud30c\uc77c\uc740 1-2 \uc8fc \uc815\ub3c4\uc758 \ub370\uc774\ud0c0\uac00 \uc0ac\uc6a9\ub418\uace0,<br \/>\n\uadf8 \uc774\uc0c1\uc774 \ub418\uba74 \uac70\uc758 \uc0ac\uc6a9\ub418\uc9c0 \uc54a\ub294\ub2e4.<\/p>\n<p>\uc544\ub798\uc640 \uac19\uc774 \uc778\ub371\uc2a4\uc5d0 \ub77c\uc774\ud504 \uc0ac\uc774\ud074\uc744 \uc801\uc6a9\ud568\uc73c\ub85c \ud574\uc11c,<br \/>\n\uc790\ub3d9\uc73c\ub85c \uc624\ub798\ub41c \uc778\ub371\uc2a4\ub97c \uc0ad\uc81c\ud558\ub3c4\ub85d \uc124\uc815\ud574 \ubcf8\ub2e4.<\/p>\n<h2>Hot phase, Warm phase, Cold phase, Delete phase<\/h2>\n<p>ILM(index lifecycle management) \uc740 4\ub2e8\uacc4\ub85c \uad6c\uc131\ud560 \uc218 \uc788\ub2e4.<\/p>\n<ul>\n<li>\n<p>Hot phase<\/p>\n<p>\uac00\uc7a5 \ub9ce\uc774 \uc870\ud68c\ub418\ub294 \ucd5c\uadfc \ub370\uc774\ud0c0<\/p>\n<\/li>\n<li>\n<p>Warm phase<\/p>\n<p>\uc77c\uc815 \uc2dc\uac04\uc774 \uc9c0\ub098 \ub728\ubbc4\ub728\ubbc4 \uc0ac\uc6a9\ub418\ub294 \ub370\uc774\ud0c0<\/p>\n<\/li>\n<li>\n<p>Cold phase<\/p>\n<p>\uac70\uc758 \uc870\ud68c\ub418\uc9c0 \uc54a\ub294 \ub370\uc774\ud0c0<\/p>\n<\/li>\n<li>\n<p>Delete phase<\/p>\n<p>\uc544\uc608 \uc870\ud68c\ub418\uc9c0 \uc54a\uc544 \uc0ad\uc81c\ud574\ub3c4 \ub418\ub294 \ub370\uc774\ud0c0<\/p>\n<\/li>\n<\/ul>\n<h2>\uc815\ucc45 \uc0dd\uc131<\/h2>\n<p>\uc544\ub798 \uba54\ub274\uc5d0\uc11c \uc815\ucc45\uc744 \uc0dd\uc131\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2022\/03\/2022-03-08-01.png\" alt=\"\" \/><\/p>\n<p>\uc6b0\uc120\uc744 \ud14c\uc2a4\ud2b8\ub97c \ubaa9\uc801\uc73c\ub85c \ud558\ub294 \uc815\ucc45\uc744 \uc0dd\uc131\ud574 \ubcf8\ub2e4.<\/p>\n<p>Policy name : test-policy<br \/>\nMaximum index size : 99999999 gigabyte<br \/>\nMaximum age : 1 hour<\/p>\n<p>\ud14c\uc2a4\ud2b8 \ubaa9\uc801\uc774\ubbc0\ub85c 1\uc2dc\uac04\ub9cc \uc720\ud6a8\ud55c \uc815\ucc45\uc744 \uc0dd\uc131\ud55c\ub2e4.<\/p>\n<p>Delete phase \ub97c \ud65c\uc131\ud654 \ud558\uace0,<br \/>\nTiming for delete phase \ub294 2 hour from rollover \ub97c \uc124\uc815\ud55c\ub2e4.<\/p>\n<p>\ub370\uc774\ud0c0\uac00 \uc0dd\uc131\ub41c \ud6c4, 2\uc2dc\uac04\uc774 \uacbd\uacfc\ud558\uba74 \uc0ad\uc81c\ub418\ub3c4\ub85d \uc124\uc815\ud55c\ub2e4.<\/p>\n<p>\ucd5c\uc885\uc801\uc73c\ub85c \uc778\ub371\uc2a4 \ud615\uc2dd\uc740 \uc544\ub798\ucc98\ub7fc \ub41c\ub2e4.<\/p>\n<pre><code class=\"language-bash\">my-log-2020.05.22-000001\nmy-log-2020.05.22-000002\nmy-log-2020.05.22-000003\nmy-log-2020.05.23-000001\nmy-log-2020.05.23-000002\nmy-log-2020.05.23-000003\nmy-log-2020.05.23-000004<\/code><\/pre>\n<h2>\uc778\ub371\uc2a4 \uc801\uc6a9<\/h2>\n<p>\uc544\ub798\uc758 \ubc29\ubc95\uc73c\ub85c \uc815\ucc45\uc744 \uc778\ub371\uc2a4\uc5d0 \uc801\uc6a9\ud560 \uc218 \uc788\ub2e4.<br \/>\n\uc778\ub371\uc2a4 \uc801\uc6a9\uc2dc Alias for rollover index \ub3c4 \uac19\uc774 \uc124\uc815\ud574 \uc900\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2022\/03\/2022-03-08-02.png\" alt=\"\" \/><\/p>\n<p>\uc544\ub798\uc758 \uba85\ub839\uc73c\ub85c \uc815\ucc45\uc774 \uc801\uc6a9\ub41c \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4.<\/p>\n<pre><code class=\"language-bash\">curl http:\/\/localhost:9200\/_template\/\uc778\ub371\uc2a4\uba85-*?pretty\n{\n  &quot;\uc778\ub371\uc2a4\uba85-*&quot; : {\n......\n    &quot;settings&quot; : {\n      &quot;index&quot; : {\n        &quot;lifecycle&quot; : {\n          &quot;name&quot; : &quot;test-policy&quot;,\n          &quot;rollover_alias&quot;: &quot;\uc778\ub371\uc2a4\uba85&quot;\n        },\n        &quot;refresh_interval&quot; : &quot;5s&quot;\n      }\n    },\n......<\/code><\/pre>\n<h2>\uc791\uc5c5\uc911<\/h2>\n<p><a href=\"https:\/\/mangkyu.tistory.com\/209\">https:\/\/mangkyu.tistory.com\/209<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Elasticsearch &#8211; Index Lifecycle Policies \ub85c\uadf8\ud30c\uc77c\uc740 1-2 \uc8fc \uc815\ub3c4\uc758 \ub370\uc774\ud0c0\uac00 \uc0ac\uc6a9\ub418\uace0, \uadf8 \uc774\uc0c1\uc774 \ub418\uba74 \uac70\uc758 \uc0ac\uc6a9\ub418\uc9c0 \uc54a\ub294\ub2e4. \uc544\ub798\uc640 \uac19\uc774 \uc778\ub371\uc2a4\uc5d0 \ub77c\uc774\ud504 \uc0ac\uc774\ud074\uc744 \uc801\uc6a9\ud568\uc73c\ub85c \ud574\uc11c, \uc790\ub3d9\uc73c\ub85c \uc624\ub798\ub41c \uc778\ub371\uc2a4\ub97c \uc0ad\uc81c\ud558\ub3c4\ub85d \uc124\uc815\ud574 \ubcf8\ub2e4. Hot phase, Warm phase, Cold phase, Delete phase ILM(index lifecycle management) \uc740 4\ub2e8\uacc4\ub85c \uad6c\uc131\ud560 \uc218 \uc788\ub2e4. Hot phase \uac00\uc7a5 \ub9ce\uc774 \uc870\ud68c\ub418\ub294 \ucd5c\uadfc \ub370\uc774\ud0c0 Warm phase\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=4923\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-4923","post","type-post","status-publish","format-standard","hentry","category-elasticsearch"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4923"}],"version-history":[{"count":12,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4923\/revisions"}],"predecessor-version":[{"id":4937,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4923\/revisions\/4937"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}