{"id":305521,"date":"2020-06-18T09:00:20","date_gmt":"2020-06-18T09:00:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=305521"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-06-18T09:00:20","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=305521","title":{"rendered":"\u0414\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Elasticsearch"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/507072\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ie\/vl\/ck\/ievlckzw7qhudvltrzgdvm-vv6s.png\"><\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0418\u0433\u043e\u0440\u044c \u0421\u0438\u0434\u043e\u0440\u0435\u043d\u043a\u043e, \u044f \u0442\u0435\u0445\u043b\u0438\u0434 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0430\u0434\u043c\u0438\u043d\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u0441\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0414\u043e\u043c\u043a\u043b\u0438\u043a.<\/p>\n<p>  <\/p>\n<p>\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Elasticsearch. \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u043d\u043e\u0434\u0430\u0445 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0440\u0434\u043e\u0432, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 ILM.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0422\u0435, \u043a\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043b\u043e\u0433\u0430\u043c\u0438, \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0434\u043e\u043b\u0433\u043e\u0441\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u0412 Elasticsearch \u044d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u0443\u0440\u0430\u0442\u043e\u0440\u0430 \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u0441\u043a\u043e\u0440\u0431\u043d\u043e. \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 6.6 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b ILM. \u041e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 4 \u0444\u0430\u0437:<\/p>\n<p>  <\/p>\n<ul>\n<li>Hot \u2014 \u0438\u043d\u0434\u0435\u043a\u0441 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/li>\n<li>Warm \u2014 \u0438\u043d\u0434\u0435\u043a\u0441 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/li>\n<li>Cold \u2014 \u0438\u043d\u0434\u0435\u043a\u0441 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0440\u0435\u0434\u043a\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0441\u0451 \u0435\u0449\u0451 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430, \u043d\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435.<\/li>\n<li>Delete \u2014 \u0438\u043d\u0434\u0435\u043a\u0441 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d. <\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"dano\">\u0414\u0430\u043d\u043e<\/h1>\n<p>  <\/p>\n<ul>\n<li>Elasticsearch Data Hot: 24 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, 128 \u0413\u0431 \u043f\u0430\u043c\u044f\u0442\u0438, 1,8 \u0422\u0431 SSD RAID 10 (8 \u043d\u043e\u0434).<\/li>\n<li>Elasticsearch Data Warm: 24 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, 64 \u0413\u0431 \u043f\u0430\u043c\u044f\u0442\u0438, 8 \u0422\u0431 NetApp SSD Policy (4 \u043d\u043e\u0434\u044b).<\/li>\n<li>Elasticsearch Data Cold: 8 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432, 32 \u0413\u0431 \u043f\u0430\u043c\u044f\u0442\u0438, 128 \u0422\u0431 HDD RAID 10 (4 \u043d\u043e\u0434\u044b).<\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"cel\">\u0426\u0435\u043b\u044c<\/h1>\n<p>  <\/p>\n<p>\u042d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b, \u0432\u0441\u0451 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u043d\u043e\u0434\u0430\u0445, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043b\u043e\u0433\u043e\u0432 \u0438 \u0442.\u0434. \u0423 \u043d\u0430\u0441 \u044d\u0442\u043e 2-3 \u0422\u0431 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430 \u0441\u0443\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<ul>\n<li>5 \u0434\u043d\u0435\u0439 \u2014 \u0444\u0430\u0437\u0430 Hot (8 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \/ 1 \u0440\u0435\u043f\u043b\u0438\u043a\u0430).<\/li>\n<li>20 \u0434\u043d\u0435\u0439 \u2014 \u0444\u0430\u0437\u0430 Warm (<a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/7.6\/indices-shrink-index.html#indices-shrink-index\">shrink-\u0438\u043d\u0434\u0435\u043a\u0441<\/a> 4 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \/ 1 \u0440\u0435\u043f\u043b\u0438\u043a\u0430).<\/li>\n<li>90 \u0434\u043d\u0435\u0439 \u2014 \u0444\u0430\u0437\u0430 Cold (<a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/7.6\/frozen-indices.html\">freeze-\u0438\u043d\u0434\u0435\u043a\u0441<\/a> 4 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \/ 1 \u0440\u0435\u043f\u043b\u0438\u043a\u0430).<\/li>\n<li>120 \u0434\u043d\u0435\u0439 \u2014 \u0444\u0430\u0437\u0430 Delete.<\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"nastroyka-elasticsearch\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Elasticsearch<\/h1>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0448\u0430\u0440\u0434 \u043f\u043e \u043d\u043e\u0434\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440:<\/p>\n<p>  <\/p>\n<ul>\n<li><em>Hot<\/em>-\u043d\u043e\u0434\u044b:<br \/> \n<pre><code class=\"plaintext\">~]# cat \/etc\/elasticsearch\/elasticsearch.yml | grep attr # Add custom attributes to the node: node.attr.box_type: hot<\/code><\/pre>\n<\/li>\n<li><em>Warm<\/em>-\u043d\u043e\u0434\u044b:<br \/> \n<pre><code class=\"plaintext\">~]# cat \/etc\/elasticsearch\/elasticsearch.yml | grep attr # Add custom attributes to the node: node.attr.box_type: warm<\/code><\/pre>\n<\/li>\n<li><em>Cold<\/em>-\u043d\u043e\u0434\u044b:<br \/> \n<pre><code class=\"plaintext\">~]# cat \/etc\/elasticsearch\/elasticsearch.yml | grep attr # Add custom attributes to the node: node.attr.box_type: cold<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"nastroyka-logstash\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Logstash<\/h1>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043a\u0430\u043a \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u043e\u0432 \u0432 Elasticsearch. \u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430:<\/p>\n<p>  <\/p>\n<ol>\n<li>Logstash \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u043b\u043e\u0433\u0438 \u0438\u0437 Kafka. \u041c\u043e\u0436\u0435\u0442 \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0447\u0438\u0441\u0442\u044b\u043c\u0438 \u0438\u043b\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435.<\/li>\n<li>\u0427\u0442\u043e-\u0442\u043e \u0441\u0430\u043c\u043e \u043f\u0438\u0448\u0435\u0442 \u0432 Elasticsearch, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, APM-\u0441\u0435\u0440\u0432\u0435\u0440.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 Logstash. \u041e\u043d \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043a \u043d\u0435\u043c\u0443 <a href=\"https:\/\/www.elastic.co\/guide\/en\/kibana\/master\/managing-indices.html\">\u0448\u0430\u0431\u043b\u043e\u043d \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/a> \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/index-lifecycle-management-api.html\">ILM<\/a>.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">k8s-ingress.conf<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">input {     kafka {         bootstrap_servers =&gt; &quot;node01, node02, node03&quot;         topics =&gt; [&quot;ingress-k8s&quot;]         decorate_events =&gt; false         codec =&gt; &quot;json&quot;     } }  filter {     ruby {         path =&gt; &quot;\/etc\/logstash\/conf.d\/k8s-normalize.rb&quot;     }     if [log] =~ &quot;\\[warn\\]&quot; or [log] =~ &quot;\\[error\\]&quot; or [log] =~ &quot;\\[notice\\]&quot; or [log] =~ &quot;\\[alert\\]&quot; {         grok {             match =&gt; { &quot;log&quot; =&gt; &quot;%{DATA:[nginx][error][time]} \\[%{DATA:[nginx][error][level]}\\] %{NUMBER:[nginx][error][pid]}#%{NUMBER:[nginx][error][tid]}: \\*%{NUMBER:[nginx][error][connection_id]} %{DATA:[nginx][error][message]}, client: %{IPORHOST:[nginx][error][remote_ip]}, server: %{DATA:[nginx][error][server]}, request: \\&quot;%{WORD:[nginx][error][method]} %{DATA:[nginx][error][url]} HTTP\/%{NUMBER:[nginx][error][http_version]}\\&quot;, (?:upstream: \\&quot;%{DATA:[nginx][error][upstream][proto]}:\/\/%{DATA:[nginx][error][upstream][host]}:%{DATA:[nginx][error][upstream][port]}\/%{DATA:[nginx][error][upstream][url]}\\&quot;, )?host: \\&quot;%{DATA:[nginx][error][host]}\\&quot;(?:, referrer: \\&quot;%{DATA:[nginx][error][referrer]}\\&quot;)?&quot; }             remove_field =&gt; &quot;log&quot;         }     }     else {         grok {             match =&gt; { &quot;log&quot; =&gt; &quot;%{IPORHOST:[nginx][access][host]} - \\[%{IPORHOST:[nginx][access][remote_ip]}\\] - %{DATA:[nginx][access][remote_user]} \\[%{HTTPDATE:[nginx][access][time]}\\] \\&quot;%{WORD:[nginx][access][method]} %{DATA:[nginx][access][url]} HTTP\/%{NUMBER:[nginx][access][http_version]}\\&quot; %{NUMBER:[nginx][access][response_code]} %{NUMBER:[nginx][access][bytes_sent]} \\&quot;%{DATA:[nginx][access][referrer]}\\&quot; \\&quot;%{DATA:[nginx][access][agent]}\\&quot; %{NUMBER:[nginx][access][request_lenght]} %{NUMBER:[nginx][access][request_time]} \\[%{DATA:[nginx][access][upstream][name]}\\] (?:-|%{IPORHOST:[nginx][access][upstream][addr]}:%{NUMBER:[nginx][access][upstream][port]}) (?:-|%{NUMBER:[nginx][access][upstream][response_lenght]}) %{DATA:[nginx][access][upstream][response_time]} %{DATA:[nginx][access][upstream][status]} %{DATA:[nginx][access][request_id]}&quot; }             remove_field =&gt; &quot;log&quot;         }     } } output {     elasticsearch {         id =&gt; &quot;k8s-ingress&quot;         hosts =&gt; [&quot;node01&quot;, &quot;node02&quot;, &quot;node03&quot;, &quot;node04&quot;, &quot;node05&quot;, &quot;node06&quot;, &quot;node07&quot;, &quot;node08&quot;]         manage_template =&gt; true # \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438         template_name =&gt; &quot;k8s-ingress&quot; # \u0438\u043c\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430         ilm_enabled =&gt; true # \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ILM         ilm_rollover_alias =&gt; &quot;k8s-ingress&quot; # alias \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u044b, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c         ilm_pattern =&gt; &quot;{now\/d}-000001&quot; # \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a &quot;{now\/d}-000001&quot; \u0442\u0430\u043a \u0438 &quot;000001&quot;         ilm_policy =&gt; &quot;k8s-ingress&quot; # \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u043c\u0430\u044f \u043a \u0438\u043d\u0434\u0435\u043a\u0441\u0443         index =&gt; &quot;k8s-ingress-%{+YYYY.MM.dd}&quot; # \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c %{+YYYY.MM.dd}, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 ilm_pattern     } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h1 id=\"nastroyka-kibana\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Kibana<\/h1>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c \u043d\u043e\u0432\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c. \u041e\u043d \u0437\u0430\u0434\u0430\u0451\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0433\u043e\u0440\u044f\u0447\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0448\u0430\u0440\u0434\u043e\u0432, \u0440\u0435\u043f\u043b\u0438\u043a \u0438 \u0442.\u0434. \u0412\u0435\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0446\u0438\u0435\u0439 <code>order<\/code>. \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u0441 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0432\u0435\u0441\u043e\u043c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u043e\u0432\u044b\u0435.<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ws\/r0\/7t\/wsr07tvfx9vip38regk_4-o8ys4.jpeg\" width=\"400\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ro\/jr\/lg\/rojrlgtpymp_gzjv_b5-mqfni1o.jpeg\" width=\"400\"><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">GET _template\/default<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">{   &quot;default&quot; : {     &quot;order&quot; : -1, # \u0432\u0435\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430     &quot;version&quot; : 1,     &quot;index_patterns&quot; : [       &quot;*&quot; # \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043a\u043e \u0432\u0441\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c     ],     &quot;settings&quot; : {       &quot;index&quot; : {         &quot;codec&quot; : &quot;best_compression&quot;, # \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0436\u0430\u0442\u0438\u044f         &quot;routing&quot; : {           &quot;allocation&quot; : {             &quot;require&quot; : {               &quot;box_type&quot; : &quot;hot&quot; # \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0433\u043e\u0440\u044f\u0447\u0438\u043c \u043d\u043e\u0434\u0430\u043c             },             &quot;total_shards_per_node&quot; : &quot;8&quot; # \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0448\u0430\u0440\u0434\u043e\u0432 \u043d\u0430 \u043d\u043e\u0434\u0443 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430           }         },         &quot;refresh_interval&quot; : &quot;5s&quot;, # \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430         &quot;number_of_shards&quot; : &quot;8&quot;, # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0448\u0430\u0440\u0434\u043e\u0432         &quot;auto_expand_replicas&quot; : &quot;0-1&quot;, # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u043f\u043b\u0438\u043a \u043d\u0430 \u043d\u043e\u0434\u0443 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430         &quot;number_of_replicas&quot; : &quot;1&quot; # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u043f\u043b\u0438\u043a       }     },     &quot;mappings&quot; : {       &quot;_meta&quot; : { },       &quot;_source&quot; : { },       &quot;properties&quot; : { }     },     &quot;aliases&quot; : { }   } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u043c\u0430\u043f\u043f\u0438\u043d\u0433 \u043a \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c <code>k8s-ingress-*<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u043c \u0432\u0435\u0441\u043e\u043c.<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ly\/k0\/ge\/lyk0gedbtw2mpnnfhmhscl66r30.jpeg\" width=\"400\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ur\/zn\/9h\/urzn9hlr47wlubv8rxne7m3t8uu.jpeg\" width=\"400\"><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">GET _template\/k8s-ingress<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">{   &quot;k8s-ingress&quot; : {     &quot;order&quot; : 100,     &quot;index_patterns&quot; : [       &quot;k8s-ingress-*&quot;     ],     &quot;settings&quot; : {       &quot;index&quot; : {         &quot;lifecycle&quot; : {           &quot;name&quot; : &quot;k8s-ingress&quot;,           &quot;rollover_alias&quot; : &quot;k8s-ingress&quot;         },         &quot;codec&quot; : &quot;best_compression&quot;,         &quot;routing&quot; : {           &quot;allocation&quot; : {             &quot;require&quot; : {               &quot;box_type&quot; : &quot;hot&quot;             }           }         },         &quot;number_of_shards&quot; : &quot;8&quot;,         &quot;number_of_replicas&quot; : &quot;1&quot;       }     },     &quot;mappings&quot; : {       &quot;numeric_detection&quot; : false,       &quot;_meta&quot; : { },       &quot;_source&quot; : { },       &quot;dynamic_templates&quot; : [         {           &quot;all_fields&quot; : {             &quot;mapping&quot; : {               &quot;index&quot; : false,               &quot;type&quot; : &quot;text&quot;             },             &quot;match&quot; : &quot;*&quot;           }         }       ],       &quot;date_detection&quot; : false,       &quot;properties&quot; : {         &quot;kubernetes&quot; : {           &quot;type&quot; : &quot;object&quot;,           &quot;properties&quot; : {             &quot;container_name&quot; : {               &quot;type&quot; : &quot;keyword&quot;             },             &quot;container_hash&quot; : {               &quot;index&quot; : false,               &quot;type&quot; : &quot;keyword&quot;             },             &quot;host&quot; : {               &quot;type&quot; : &quot;keyword&quot;             },             &quot;annotations&quot; : {               &quot;type&quot; : &quot;object&quot;,               &quot;properties&quot; : {                 &quot;value&quot; : {                   &quot;index&quot; : false,                   &quot;type&quot; : &quot;text&quot;                 },                 &quot;key&quot; : {                   &quot;index&quot; : false,                   &quot;type&quot; : &quot;keyword&quot;                 }               }             },             &quot;docker_id&quot; : {               &quot;index&quot; : false,               &quot;type&quot; : &quot;keyword&quot;             },             &quot;pod_id&quot; : {               &quot;type&quot; : &quot;keyword&quot;             },             &quot;labels&quot; : {               &quot;type&quot; : &quot;object&quot;,               &quot;properties&quot; : {                 &quot;value&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;key&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 }               }             },             &quot;namespace_name&quot; : {               &quot;type&quot; : &quot;keyword&quot;             },             &quot;pod_name&quot; : {               &quot;type&quot; : &quot;keyword&quot;             }           }         },         &quot;@timestamp&quot; : {           &quot;type&quot; : &quot;date&quot;         },         &quot;nginx&quot; : {           &quot;type&quot; : &quot;object&quot;,           &quot;properties&quot; : {             &quot;access&quot; : {               &quot;type&quot; : &quot;object&quot;,               &quot;properties&quot; : {                 &quot;agent&quot; : {                   &quot;type&quot; : &quot;text&quot;                 },                 &quot;response_code&quot; : {                   &quot;type&quot; : &quot;integer&quot;                 },                 &quot;upstream&quot; : {                   &quot;type&quot; : &quot;object&quot;,                   &quot;properties&quot; : {                     &quot;port&quot; : {                       &quot;type&quot; : &quot;keyword&quot;                     },                     &quot;name&quot; : {                       &quot;type&quot; : &quot;keyword&quot;                     },                     &quot;response_lenght&quot; : {                       &quot;type&quot; : &quot;integer&quot;                     },                     &quot;response_time&quot; : {                       &quot;index&quot; : false,                       &quot;type&quot; : &quot;text&quot;                     },                     &quot;addr&quot; : {                       &quot;type&quot; : &quot;keyword&quot;                     },                     &quot;status&quot; : {                       &quot;index&quot; : false,                       &quot;type&quot; : &quot;text&quot;                     }                   }                 },                 &quot;method&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;http_version&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;bytes_sent&quot; : {                   &quot;type&quot; : &quot;integer&quot;                 },                 &quot;request_lenght&quot; : {                   &quot;type&quot; : &quot;integer&quot;                 },                 &quot;url&quot; : {                   &quot;type&quot; : &quot;text&quot;,                   &quot;fields&quot; : {                     &quot;keyword&quot; : {                       &quot;type&quot; : &quot;keyword&quot;                     }                   }                 },                 &quot;remote_user&quot; : {                   &quot;type&quot; : &quot;text&quot;                 },                 &quot;referrer&quot; : {                   &quot;type&quot; : &quot;text&quot;                 },                 &quot;remote_ip&quot; : {                   &quot;type&quot; : &quot;ip&quot;                 },                 &quot;request_time&quot; : {                   &quot;format&quot; : &quot;yyyy\/MM\/dd HH:mm:ss||yyyy\/MM\/dd||epoch_millis||dd\/MMM\/YYYY:H:m:s Z&quot;,                   &quot;type&quot; : &quot;date&quot;                 },                 &quot;host&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;time&quot; : {                   &quot;format&quot; : &quot;yyyy\/MM\/dd HH:mm:ss||yyyy\/MM\/dd||epoch_millis||dd\/MMM\/YYYY:H:m:s Z&quot;,                   &quot;type&quot; : &quot;date&quot;                 }               }             },             &quot;error&quot; : {               &quot;type&quot; : &quot;object&quot;,               &quot;properties&quot; : {                 &quot;server&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;upstream&quot; : {                   &quot;type&quot; : &quot;object&quot;,                   &quot;properties&quot; : {                     &quot;port&quot; : {                       &quot;type&quot; : &quot;keyword&quot;                     },                     &quot;proto&quot; : {                       &quot;type&quot; : &quot;keyword&quot;                     },                     &quot;host&quot; : {                       &quot;type&quot; : &quot;keyword&quot;                     },                     &quot;url&quot; : {                       &quot;type&quot; : &quot;text&quot;,                       &quot;fields&quot; : {                         &quot;keyword&quot; : {                           &quot;type&quot; : &quot;keyword&quot;                         }                       }                     }                   }                 },                 &quot;method&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;level&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;http_version&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;pid&quot; : {                   &quot;index&quot; : false,                   &quot;type&quot; : &quot;integer&quot;                 },                 &quot;message&quot; : {                   &quot;type&quot; : &quot;text&quot;                 },                 &quot;tid&quot; : {                   &quot;index&quot; : false,                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;url&quot; : {                   &quot;type&quot; : &quot;text&quot;,                   &quot;fields&quot; : {                     &quot;keyword&quot; : {                       &quot;type&quot; : &quot;keyword&quot;                     }                   }                 },                 &quot;referrer&quot; : {                   &quot;type&quot; : &quot;text&quot;                 },                 &quot;remote_ip&quot; : {                   &quot;type&quot; : &quot;ip&quot;                 },                 &quot;connection_id&quot; : {                   &quot;index&quot; : false,                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;host&quot; : {                   &quot;type&quot; : &quot;keyword&quot;                 },                 &quot;time&quot; : {                   &quot;format&quot; : &quot;yyyy\/MM\/dd HH:mm:ss||yyyy\/MM\/dd||epoch_millis||dd\/MMM\/YYYY:H:m:s Z&quot;,                   &quot;type&quot; : &quot;date&quot;                 }               }             }           }         },         &quot;log&quot; : {           &quot;type&quot; : &quot;text&quot;         },         &quot;@version&quot; : {           &quot;type&quot; : &quot;text&quot;,           &quot;fields&quot; : {             &quot;keyword&quot; : {               &quot;ignore_above&quot; : 256,               &quot;type&quot; : &quot;keyword&quot;             }           }         },         &quot;eventtime&quot; : {           &quot;type&quot; : &quot;float&quot;         }       }     },     &quot;aliases&quot; : { }   } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c ILM-\u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0436\u0438\u0437\u043d\u044c\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d-\/pw\/rk\/d-pwrkrxqdcxrnu7xfkiz1jf7ek.jpeg\"><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3y\/4z\/gf\/3y4zgfjk7delfybib7kviwcgfgi.jpeg\"><\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lt\/wi\/wy\/ltwiwybdhgkdpq1hovlyay6-go8.jpeg\"><\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">GET _ilm\/policy\/k8s-ingress<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">{   &quot;k8s-ingress&quot; : {     &quot;version&quot; : 14,     &quot;modified_date&quot; : &quot;2020-06-11T10:27:01.448Z&quot;,     &quot;policy&quot; : {       &quot;phases&quot; : {         &quot;warm&quot; : { # \u0442\u0435\u043f\u043b\u0430\u044f \u0444\u0430\u0437\u0430           &quot;min_age&quot; : &quot;5d&quot;, # \u0441\u0440\u043e\u043a \u0436\u0438\u0437\u043d\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043e \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043f\u043b\u043e\u0439 \u0444\u0430\u0437\u044b           &quot;actions&quot; : {             &quot;allocate&quot; : {               &quot;include&quot; : { },               &quot;exclude&quot; : { },               &quot;require&quot; : {                 &quot;box_type&quot; : &quot;warm&quot; # \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441               }             },             &quot;shrink&quot; : {               &quot;number_of_shards&quot; : 4 # \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u0442.\u043a. \u0443 \u043d\u0430\u0441 4 \u043d\u043e\u0434\u044b             }           }         },         &quot;cold&quot; : { # \u0445\u043e\u043b\u043e\u0434\u043d\u0430\u044f \u0444\u0430\u0437\u0430           &quot;min_age&quot; : &quot;25d&quot;, # \u0441\u0440\u043e\u043a \u0436\u0438\u0437\u043d\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u043e\u0441\u043b\u0435 \u0440\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043e \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u0439 \u0444\u0430\u0437\u044b           &quot;actions&quot; : {             &quot;allocate&quot; : {               &quot;include&quot; : { },               &quot;exclude&quot; : { },               &quot;require&quot; : {                 &quot;box_type&quot; : &quot;cold&quot; # \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441               }             },             &quot;freeze&quot; : { } # \u0437\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438           }         },         &quot;hot&quot; : { # \u0433\u043e\u0440\u044f\u0447\u0430\u044f \u0444\u0430\u0437\u0430           &quot;min_age&quot; : &quot;0ms&quot;,           &quot;actions&quot; : {             &quot;rollover&quot; : {               &quot;max_size&quot; : &quot;50gb&quot;, # \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0434\u043e \u0440\u043e\u0442\u0430\u0446\u0438\u0438 (\u0431\u0443\u0434\u0435\u0442 \u04452, \u0442.\u043a. \u0435\u0441\u0442\u044c 1 \u0440\u0435\u043f\u043b\u0438\u043a\u0430)               &quot;max_age&quot; : &quot;1d&quot; # \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0440\u043e\u043a \u0436\u0438\u0437\u043d\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0434\u043e \u0440\u043e\u0442\u0430\u0446\u0438\u0438             },             &quot;set_priority&quot; : {               &quot;priority&quot; : 100             }           }         },         &quot;delete&quot; : { # \u0444\u0430\u0437\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f           &quot;min_age&quot; : &quot;120d&quot;, # \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0440\u043e\u043a \u0436\u0438\u0437\u043d\u0438 \u043f\u043e\u0441\u043b\u0435 \u0440\u043e\u0442\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c           &quot;actions&quot; : {             &quot;delete&quot; : { }           }         }       }     }   } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h1 id=\"problemy\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/h1>\n<p>  <\/p>\n<p>\u0411\u044b\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"hot-faza\">Hot-\u0444\u0430\u0437\u0430<\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u043e\u0442\u0430\u0446\u0438\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435 <code>index_name-date-000026<\/code> \u0447\u0438\u0441\u0435\u043b \u0444\u043e\u0440\u043c\u0430\u0442\u0430 <code>000001<\/code>. \u0412 \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0447\u0438\u0441\u0435\u043b \u0432 \u043a\u043e\u043d\u0446\u0435. \u0418\u043d\u0430\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430, \u043a \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u0441\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0438 \u043e\u043d \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432 hot-\u0444\u0430\u0437\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"warm-faza\">Warm-\u0444\u0430\u0437\u0430<\/h3>\n<p>  <\/p>\n<p><em>Shrink<\/em> (\u043e\u0431\u0440\u0435\u0437\u0430\u043d\u0438\u0435) \u2014 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0448\u0430\u0440\u0434\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u043e\u0434 \u0432 \u0442\u0435\u043f\u043b\u043e\u0439 \u0438 \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u0439 \u0444\u0430\u0437\u0430\u0445 \u0443 \u043d\u0430\u0441 \u043f\u043e 4. \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<p>  <\/p>\n<blockquote>\n<ul>\n<li>The index must be read-only.<\/li>\n<li>A copy of every shard in the index must reside on the same node.<\/li>\n<li>The cluster health status must be green.<\/li>\n<\/ul>\n<p>  <\/p><\/blockquote>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0440\u0435\u0437\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441, Elasticsearch \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 (primary) \u0448\u0430\u0440\u0434\u044b \u043d\u0430 \u043e\u0434\u043d\u0443 \u043d\u043e\u0434\u0443, \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442 \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u0442\u0430\u0440\u044b\u0439. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>total_shards_per_node<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u0435\u043d \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0448\u0430\u0440\u0434\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043d\u043e\u0434\u0435. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0438 \u0448\u0430\u0440\u0434\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0435\u0434\u0443\u0442 \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u043e\u0434\u044b.<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3u\/7i\/9_\/3u7i9_tzlfkx6uo2wxbs67abkzi.jpeg\" width=\"400\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ed\/yl\/0h\/edyl0hz3rjlwno_ui6ysjkiazpe.jpeg\" width=\"400\"><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">GET \/shrink-k8s-ingress-2020.06.06-000025\/_settings<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">{   &quot;shrink-k8s-ingress-2020.06.06-000025&quot; : {     &quot;settings&quot; : {       &quot;index&quot; : {         &quot;refresh_interval&quot; : &quot;5s&quot;,         &quot;auto_expand_replicas&quot; : &quot;0-1&quot;,         &quot;blocks&quot; : {           &quot;write&quot; : &quot;true&quot;         },         &quot;provided_name&quot; : &quot;shrink-k8s-ingress-2020.06.06-000025&quot;,         &quot;creation_date&quot; : &quot;1592225525569&quot;,         &quot;priority&quot; : &quot;100&quot;,         &quot;number_of_replicas&quot; : &quot;1&quot;,         &quot;uuid&quot; : &quot;psF4MiFGQRmi8EstYUQS4w&quot;,         &quot;version&quot; : {           &quot;created&quot; : &quot;7060299&quot;,           &quot;upgraded&quot; : &quot;7060299&quot;         },         &quot;lifecycle&quot; : {           &quot;name&quot; : &quot;k8s-ingress&quot;,           &quot;rollover_alias&quot; : &quot;k8s-ingress&quot;,           &quot;indexing_complete&quot; : &quot;true&quot;         },         &quot;codec&quot; : &quot;best_compression&quot;,         &quot;routing&quot; : {           &quot;allocation&quot; : {             &quot;initial_recovery&quot; : {               &quot;_id&quot; : &quot;_Le0Ww96RZ-o76bEPAWWag&quot;             },             &quot;require&quot; : {               &quot;_id&quot; : null,               &quot;box_type&quot; : &quot;cold&quot;             },             &quot;total_shards_per_node&quot; : &quot;8&quot;           }         },         &quot;number_of_shards&quot; : &quot;4&quot;,         &quot;routing_partition_size&quot; : &quot;1&quot;,         &quot;resize&quot; : {           &quot;source&quot; : {             &quot;name&quot; : &quot;k8s-ingress-2020.06.06-000025&quot;,             &quot;uuid&quot; : &quot;gNhYixO6Skqi54lBjg5bpQ&quot;           }         }       }     }   } }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h3 id=\"cold-faza\">Cold-\u0444\u0430\u0437\u0430<\/h3>\n<p>  <\/p>\n<p><em>Freeze<\/em> (\u0437\u0430\u043c\u043e\u0440\u043e\u0437\u043a\u0430) \u2014 \u043c\u044b \u0437\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c.<\/p>\n<p>  <\/p>\n<blockquote><p>Searches performed on frozen indices use the small, dedicated, search_throttled threadpool to control the number of concurrent searches that hit frozen shards on each node. This limits the amount of extra memory required for the transient data structures corresponding to frozen shards, which consequently protects nodes against excessive memory consumption.<br \/>  Frozen indices are read-only: you cannot index into them.<br \/>  Searches on frozen indices are expected to execute slowly. Frozen indices are not intended for high search load. It is possible that a search of a frozen index may take seconds or minutes to complete, even if the same searches completed in milliseconds when the indices were not frozen.<\/p><\/blockquote>\n<p>  <\/p>\n<h1 id=\"itogi\">\u0418\u0442\u043e\u0433\u0438<\/h1>\n<p>  <\/p>\n<p>\u041c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 ILM, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0448\u0430\u0440\u0434\u043e\u0432 \u043f\u043e \u0433\u043e\u0440\u044f\u0447\u0438\u043c \u043d\u043e\u0434\u0430\u043c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 ILM \u043d\u0430 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0444\u0430\u0437\u0430\u043c\u0438 \u0436\u0438\u0437\u043d\u0438.<\/p>\n<p>  <\/p>\n<h1 id=\"poleznye-ssylki\">\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h1>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/index-lifecycle-management-api.html\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/index-lifecycle-management-api.html<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/recovery-prioritization.html\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/recovery-prioritization.html<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/indices-shrink-index.html#indices-shrink-index\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/indices-shrink-index.html#indices-shrink-index<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/frozen-indices.html\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/frozen-indices.html<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/modules-cluster.html#shard-allocation-awareness\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/master\/modules-cluster.html#shard-allocation-awareness<\/a><\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/507072\/\"> https:\/\/habr.com\/ru\/company\/domclick\/blog\/507072\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/domclick\/blog\/507072\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ie\/vl\/ck\/ievlckzw7qhudvltrzgdvm-vv6s.png\"><\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0418\u0433\u043e\u0440\u044c \u0421\u0438\u0434\u043e\u0440\u0435\u043d\u043a\u043e, \u044f \u0442\u0435\u0445\u043b\u0438\u0434 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0430\u0434\u043c\u0438\u043d\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u0441\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0414\u043e\u043c\u043a\u043b\u0438\u043a.<\/p>\n<p>  <\/p>\n<p>\u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Elasticsearch. \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u043d\u043e\u0434\u0430\u0445 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0440\u0434\u043e\u0432, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 ILM.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-305521","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=305521"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305521\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}