{"id":8,"date":"2024-02-01T05:39:44","date_gmt":"2024-01-31T21:39:44","guid":{"rendered":"http:\/\/www.pay299.com\/?p=8"},"modified":"2024-02-01T05:40:12","modified_gmt":"2024-01-31T21:40:12","slug":"elasticsearch-7-12%e7%b4%a2%e5%bc%95%e7%94%9f%e5%91%bd%e5%91%a8%e6%9c%9f%e8%ae%be%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.pay299.com\/index.php\/2024\/02\/01\/elasticsearch-7-12%e7%b4%a2%e5%bc%95%e7%94%9f%e5%91%bd%e5%91%a8%e6%9c%9f%e8%ae%be%e7%bd%ae\/","title":{"rendered":"ElasticSearch-7.12\u7d22\u5f15\u751f\u547d\u5468\u671f\u8bbe\u7f6e"},"content":{"rendered":"<p>\u73af\u5883\u8bf4\u660e\uff1a<br \/>\ncentos 7.6<br \/>\nelasticsearch 7.12 kibana 7.12<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.pay299.com\/wp-content\/uploads\/2024\/02\/333333-300x217.png\" alt=\"\" width=\"300\" height=\"217\" class=\"alignnone size-medium wp-image-9\" srcset=\"https:\/\/www.pay299.com\/wp-content\/uploads\/2024\/02\/333333-300x217.png 300w, https:\/\/www.pay299.com\/wp-content\/uploads\/2024\/02\/333333-768x555.png 768w, https:\/\/www.pay299.com\/wp-content\/uploads\/2024\/02\/333333.png 822w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u521b\u5efa\u968f\u65e5\u671f\u800c\u53d8\u52a8\u7684\u7d22\u5f15\uff1adate math<br \/>\n\u4ee5\u524d\u7814\u7a76\u8fc7ES\u7684\u5feb\u7167\u7b56\u7565\uff0c\u4ee5\u4e3a\u521b\u5efa\u7d22\u5f15\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u8fd9\u79cd\u683c\u5f0f\uff0c\u4f46\u662f\u5b9e\u9645\u4e0a\u5e76\u4e0d\u884c\u3002\u5728ES\u4e2d\u521b\u5efa\u82b1\u5f0f\u7d22\u5f15\u4e5f\u662f\u6709\u4e00\u5957\u89c4\u5219\u7684\u3002<\/p>\n<p>\u5b98\u7f51\u94fe\u63a5\uff1ahttps:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/7.x\/date-math-index-names.html<\/p>\n<p>\u5728\u67e5\u9605\u4e86\u5b98\u65b9\u6587\u6863\u540e\uff0c\u53d1\u73b0\u4e86ES\u4e2d\u8fd8\u6709date math\u3002\u4e0b\u9762\u662f\u4e00\u4e9b\u57fa\u7840\u7684\u7528\u6cd5\u3002<\/p>\n<p>\u65e5\u671f\u6570\u5b66\u8868\u8fbe\u5f0f\u7684\u89e3\u6790\u4e0e\u8bed\u8a00\u73af\u5883\u65e0\u5173\u3002\u56e0\u6b64\uff0c\u4e0d\u80fd\u4f7f\u7528\u516c\u5386\u4ee5\u5916\u7684\u4efb\u4f55\u5176\u4ed6\u65e5\u5386\u3002<\/p>\n<p>\u60a8\u5fc5\u987b\u5c06\u65e5\u671f\u6570\u5b66\u540d\u79f0\u62ec\u5728\u5c16\u62ec\u53f7\u4e2d\u3002\u5982\u679c\u5728\u8bf7\u6c42\u8def\u5f84\u4e2d\u4f7f\u7528\u540d\u79f0\uff0c\u5219\u7279\u6b8a\u5b57\u7b26\u5fc5\u987b\u662f URI \u7f16\u7801\u7684\u3002\u4f8b\u5982\uff1a<\/p>\n<p># PUT \/&lt;my-index-{now\/d}&gt;<br \/>\ncurl -X PUT &#8220;localhost:9200\/%3Cmy-index-%7Bnow%2Fd%7D%3E?pretty&#8221;<br \/>\n\u521b\u5efa\u5b8c\u6210\u540e\u7684\u7d22\u5f15\u683c\u5f0f\u5728kibana\u67e5\u770b\u5c31\u662f<br \/>\n&lt;my-index-\u5f53\u65e5\u65e5\u671f&gt; &#8212;&gt; &lt;my-index-2021.08.13&gt;<br \/>\n1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n\u65e5\u671f\u6570\u5b66\u5b57\u7b26\u7684\u767e\u5206\u6bd4\u7f16\u7801\uff08\u7528\u4e8e\u65e5\u671f\u820d\u5165\u7684\u7279\u6b8a\u5b57\u7b26\u5fc5\u987b\u6309\u5982\u4e0b\u65b9\u5f0f\u8fdb\u884cURI\u7f16\u7801\uff09<\/p>\n<p>&lt; %3C<br \/>\n&gt; %3E<br \/>\n\/ %2F<br \/>\n{ %7B<br \/>\n} %7D<br \/>\n| %7C<br \/>\n+ %2B<br \/>\n: %3A<br \/>\n, %2C<br \/>\n\u64cd\u4f5c<br \/>\nES<br \/>\n\u6309\u7167\u73b0\u6709\u73af\u5883\u5220\u9664stdout\u7d22\u5f15<br \/>\ncurl -X DELETE &#8220;192.168.184.129:9200\/stdout&#8221;<br \/>\n1<br \/>\n\u521b\u5efaroll\u7d22\u5f15<br \/>\ncurl -X PUT &#8220;192.168.184.128:9200\/%3Cstdout-%7Bnow%2Fd%7D-000001%3E?pretty&#8221;<br \/>\n1<br \/>\n\u589e\u52a0\u7d22\u5f15\u7684\u522b\u540d<br \/>\ncurl -X POST &#8220;192.168.184.129:9200\/_aliases?pretty&#8221; -H &#8216;Content-Type: application\/json&#8217; -d&#8217;<br \/>\n{<br \/>\n&#8220;actions&#8221; : [<br \/>\n{ &#8220;add&#8221; : { &#8220;index&#8221; : &#8220;stdout-2021.08.13-000001&#8221;, &#8220;alias&#8221; : &#8220;stdout&#8221; } }<br \/>\n]<br \/>\n}<br \/>\n&#8216;<br \/>\n1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n5<br \/>\n6<br \/>\n7<br \/>\nPS:\u8fd9\u91cc\u7684\u7d22\u5f15\u521b\u5efa\u540e\u547d\u540d\u683c\u5f0f\u4e3a&lt;stdout-{now\/d}-000001&gt;<\/p>\n<p>Kibana<br \/>\n\u8fd9\u91cc\u53ef\u4ee5\u770b\u5230\u54b1\u4eec\u521a\u521a\u770b\u5230\u7684\u7d22\u5f15\u548c\u522b\u540d<\/p>\n<p>\u521b\u5efa\u7d22\u5f15\u6a21\u677f<\/p>\n<p>\u5269\u4e0b\u7684\u90fd\u53ef\u4ee5\u4e0d\u586b\uff0c\u4e00\u8def\u5feb\u8fdb\u5230\u6a21\u677f\u521b\u5efa\u5b8c\u6210\u3002\uff08\u7d22\u5f15\u8bbe\u7f6e\u548c\u6620\u5c04\u4f1a\u5728\u6a21\u677f\u7ed1\u5b9a\u7b56\u7565\u548c\u7d22\u5f15\u7684\u65f6\u5019\u81ea\u52a8\u586b\u5145\uff09<\/p>\n<p>\u521b\u5efa\u7d22\u5f15\u751f\u547d\u5468\u671f\u7b56\u7565<\/p>\n<p>\u5220\u9664\u9636\u6bb5<\/p>\n<p>\u5b8c\u6210\u540e\u4fdd\u5b58\u7b56\u7565\u3002\u4e2d\u95f4\u8fd8\u6709\u6e29\u9636\u6bb5\u548c\u51b7\u9636\u6bb5\uff0c\u53ef\u4ee5\u6309\u7167\u9700\u6c42\u8fdb\u884c\u8bbe\u7f6e\uff0c\u8fd9\u91cc\u56e0\u4e3a\u6ca1\u6709\u9700\u6c42\u5c31\u6ca1\u6709\u8bbe\u7f6e\u3002<\/p>\n<p>\u5c06\u7b56\u7565\u7ed1\u5b9a\u6a21\u677f<\/p>\n<p>\u8fd9\u91cc\u7684\u6eda\u52a8\u66f4\u65b0\u7d22\u5f15\u7684\u522b\u540d\u5c31\u586b\u5199\u8bbe\u7f6e\u597d\u7684\u522b\u540d\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u7b56\u7565\u7ed1\u5b9a\u7d22\u5f15<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p>\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a\u535a\u4e3b\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faa CC 4.0 BY-SA \u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u548c\u672c\u58f0\u660e\u3002<\/p>\n<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/blog.csdn.net\/m0_46435788\/article\/details\/119679373<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883\u8bf4\u660e\uff1a centos 7.6 elasticsearch 7.12 kibana 7.12 \u521b\u5efa\u968f\u65e5\u671f\u800c\u53d8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-js"],"_links":{"self":[{"href":"https:\/\/www.pay299.com\/index.php\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pay299.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pay299.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pay299.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pay299.com\/index.php\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":0,"href":"https:\/\/www.pay299.com\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pay299.com\/index.php\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pay299.com\/index.php\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pay299.com\/index.php\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}