{"id":1127,"date":"2019-08-19T23:50:19","date_gmt":"2019-08-19T14:50:19","guid":{"rendered":"https:\/\/oboki.net\/workspace\/?p=1127"},"modified":"2019-09-01T22:19:50","modified_gmt":"2019-09-01T13:19:50","slug":"elasticsearch-%ea%b2%80%ec%83%89%ec%97%94%ec%a7%84-%eb%a7%8c%eb%93%a4%ea%b8%b0-1-mac%ec%97%90-elasticsearch-kibana-%ec%84%a4%ec%b9%98","status":"publish","type":"post","link":"https:\/\/oboki.net\/workspace\/data-engineering\/elasticsearch\/elasticsearch-%ea%b2%80%ec%83%89%ec%97%94%ec%a7%84-%eb%a7%8c%eb%93%a4%ea%b8%b0-1-mac%ec%97%90-elasticsearch-kibana-%ec%84%a4%ec%b9%98\/","title":{"rendered":"[ElasticSearch] \uac80\uc0c9\uc5d4\uc9c4 \ub9cc\ub4e4\uae30 1 &#8211; Mac\uc5d0 ElasticSearch, Kibana \uc124\uce58"},"content":{"rendered":"<p>\uae30\uc874\uc5d0 \ub9cc\ub4e4\uc5c8\ub358 IMS \uac80\uc0c9\uc5d4\uc9c4\uc758 \uc544\uc774\ub514\uc5b4\ub4e4\uc744 \uc815\ub9ac\ud558\uba74\uc11c \ub3d9\uc2dc\uc5d0 Mac\uacfc \uce5c\ud574\uc9c8 \uacb8 Mac \ud658\uacbd\uc73c\ub85c \uc9c4\ud589\ud560 \uc608\uc815. \uadf8\ub9ac\uace0 \uae30\uc874 \uac80\uc0c9\uc5d4\uc9c4\uc740 ELK 6 \ubc84\uc804\uc5d0\uc11c \ub9cc\ub4e4\uc5c8\uc5c8\ub294\ub370 7 \ubc84\uc804\uc5d0\uc11c \uad6c\ud604\ud574\ubcf4\uba70 \ucd5c\uc2e0 \ubc84\uc804 \uccb4\ud5d8\ub3c4 \ud574\ubcf4\ub824\uace0 \ud55c\ub2e4. \uc11c\ubc84\uc5d0 \uc788\ub358 \uc18c\uc2a4\ub4e4\uc744 Mac \ub85c\uceec \ud658\uacbd\uc73c\ub85c \ub0b4\ub824\ubc1b\uc544 \uad6c\ub3d9\ud574\ubcf4\ub824\uace0 \ud588\ub354\ub2c8 index \ub9cc\ub4dc\ub294 \uac83\ubd80\ud130 \ubcc0\uacbd \uc0ac\ud56d\uc774 \uc788\uc5c8\uace0, Search API\uc5d0\ub3c4 type \uad6c\uc870\uac00 \ub4dc\ub514\uc5b4 \uc5c6\uc5b4\uc9c0\uba74\uc11c \ub2ec\ub77c\uc9c4 \ubd80\ubd84\uc774 \ubc14\ub85c \ub208\uc5d0 \ub744\uc5c8\ub2e4.<\/p>\n<p>\ub2e4\uc74c\uacfc \uac19\uc740 \uac1c\uc694\ub85c \uc9c4\ud589\ud558\uba74\ub420 \uac83 \uac19\uc740\ub370<\/p>\n<ol>\n<li>ElasticSearch, Kibana \uc124\uce58<\/li>\n<li>IMS \ub370\uc774\ud130 \ud06c\ub864\ub9c1<\/li>\n<li>Python \uac80\uc0c9 \ubaa8\ub4c8 \ub9cc\ub4e4\uae30<\/li>\n<li>Flask \uc6f9\uc11c\ube44\uc2a4<\/li>\n<\/ol>\n<p>\uc624\ub298\uc740 \uccab\ubc88\uc9f8 <strong><code>1. ElasticSearch, Kibana \uc124\uce58<\/code><\/strong> \ub2e8\uacc4\ub85c, \uc6b4\uc601 \uc11c\ubc84\uac00 \uc544\ub2cc Mac \uac1c\ubc1c\ud658\uacbd\uc5d0\uc11c \ub300\ucda9 localhost \ub85c \ud14c\uc2a4\ud2b8\ud560 \uac83\uc774\uae30 \ub54c\ubb38\uc5d0 \uc124\uc815\ud560 \ubd80\ubd84\uc774 \uc544\ubb34\uac83\ub3c4 \uc5c6\ub2e4.<\/p>\n<h1>ElasticSearch, Kibana \uc124\uce58<\/h1>\n<p>\uc5d8\ub77c\uc2a4\ud2f1 \uacf5\ud648 (<code><a href=\"https:\/\/www.elastic.co\/kr\/start\">https:\/\/www.elastic.co\/kr\/start<\/a><\/code>) \uc5d0 \uac00\uba74 Windows, Mac, Linux \ud658\uacbd\ubcc4 \ubc14\uc774\ub108\ub9ac\ub97c \uc81c\uacf5\ud558\ub294\ub370<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/oboki.net\/workspace\/wp-content\/uploads\/2019\/08\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2019-08-19-\u110b\u1169\u1112\u116e-8.35.33.png\" alt=\"\" \/><\/p>\n<p>\ud658\uacbd\uc5d0 \ub9de\ub294 \ubc14\uc774\ub108\ub9ac\ub97c \uc0ac\uc6a9\ud560 \uac83.<\/p>\n<h2>ElasticSearch \uc124\uce58<\/h2>\n<p>\uc801\ub2f9\ud55c \uc704\uce58\ub97c \ub9cc\ub4e4\uc5b4\uc11c, \ubc14\uc774\ub108\ub9ac\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud558\uace0 \uc555\ucd95\uc744 \ud480\uace0 \uc2e4\ud589\ud558\uba74 \ub05d. \uc5ec\uae30\uc5d0\uc11c\ub294 \ud648\uacbd\ub85c\uc5d0 <code>Elastic<\/code> \uc774\ub77c\ub294 \ub514\ub809\ud1a0\ub9ac\ub97c \ub9cc\ub4e4\uc5b4\uc11c \uc9c4\ud589.<\/p>\n<pre><code class=\"language-bash\">mkdir ~\/Elastic\ncd ~\/Elastic\ncurl -O https:\/\/artifacts.elastic.co\/downloads\/elasticsearch\/elasticsearch-7.3.0-darwin-x86_64.tar.gz\ntar -xvzf elasticsearch-7.3.0-darwin-x86_64.tar.gz\nelasticsearch-7.3.0\/bin\/elasticsearch &amp;<\/code><\/pre>\n<p>\uc6f9\ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c <code><a href=\"http:\/\/localhost:9200\">http:\/\/localhost:9200<\/a><\/code> \uacbd\ub85c\uc5d0 \uc811\uadfc\ud558\uba74 \uc544\ub798\uc640 \uac19\uc774 \uae30\ubcf8\uc801\uc778 elasticsearch \ud074\ub7ec\uc2a4\ud130 \uc815\ubcf4\ub97c \ud655\uc778\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/oboki.net\/workspace\/wp-content\/uploads\/2019\/08\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2019-08-19-\u110b\u1169\u1112\u116e-8.35.40.png\" alt=\"\" \/><\/p>\n<h3>nori analyzer \uc124\uce58<\/h3>\n<p>\ud55c\uae00 \ud14d\uc2a4\ud2b8\ub97c \ucc3e\ub294 \uac80\uc0c9 \uc5d4\uc9c4\uc744 \ub9cc\ub4e4 \uac83\uc774\uae30\ub54c\ubb38\uc5d0 nori \ud615\ud0dc\uc18c \ubd84\uc11d\uae30\uae4c\uc9c0 \uc124\uce58\ud55c\ub2e4.<\/p>\n<pre><code class=\"language-bash\">elasticsearch-7.3.0\/bin\/elasticsearch-plugin install analysis-nori<\/code><\/pre>\n<p>\ub2e4\uc74c \uba54\uc2dc\uc9c0\uac00 \ucd9c\ub825\ub418\uba74 \uc815\uc0c1\uc801\uc73c\ub85c \uc124\uce58\ub41c \uac83\uc778\ub370<\/p>\n<pre><code class=\"language-bash\">-&gt; Installed analysis-nori<\/code><\/pre>\n<p>\ud50c\ub7ec\uadf8\uc778\uc774 \uc801\uc6a9\ub418\ub824\uba74 \uc7ac\uae30\ub3d9\uc744 \ud574\uc8fc\uc5b4\uc57c \ud55c\ub2e4.<\/p>\n<pre><code class=\"language-bash\">fuser -kn tcp 9200 ## elasticsearch \uc885\ub8cc. fuser\uac00 \uc5c6\uc73c\uba74 9200 \ud3ec\ud2b8\ub97c \uc0ac\uc6a9\ud558\ub294 \ud504\ub85c\uc138\uc2a4\ub97c \ucc3e\uc544 \uc218\ub3d9\uc73c\ub85c \uc885\ub8cc\nelasticsearch-7.3.0\/bin\/elasticsearch &amp; ## elasticsearch \uc2e4\ud589<\/code><\/pre>\n<h3>issue \uc778\ub371\uc2a4 \ud15c\ud50c\ub9bf \uc0dd\uc131<\/h3>\n<p>\uc778\ub371\uc2a4 \ud15c\ud50c\ub9bf\uc740 \ud2b9\uc815 \uc774\ub984\uc73c\ub85c \uc0dd\uc131\ub418\ub294 \uc778\ub371\uc2a4\uc5d0 \ub300\ud574 \ub2e4\uc74c\uacfc \uac19\uc740 \ub370\uc774\ud130 \ud0c0\uc785\uacfc Anaylzer \ub97c \uace0\uc815\uc2dc\ud0a4\ub294 \uae30\ub2a5\uc744 \ud574\uc8fc\ub294\ub370, RDBMS DDL\uacfc \ube44\uc2b7\ud558\ub2e4. Full-Text Search \ub97c \uc801\uc6a9\ud560 \ud544\ub4dc\ub4e4\uc5d0 \ub300\ud574\uc11c\ub294 nori \ud615\ud0dc\uc18c \ubd84\uc11d\uae30\ub97c \uc801\uc6a9\ud574\uc8fc\uace0 \ub098\uba38\uc9c0\ub294 keword, date \uc815\ub3c4\ub85c\ub9cc \uc9c0\uc815\ud55c\ub2e4.<\/p>\n<pre><code class=\"language-bash\">curl -X PUT &quot;localhost:9200\/_template\/template_issue-v0.1.4?pretty&quot; -H &#039;Content-Type: application\/json&#039; -d&#039; \n{\n    &quot;template&quot; : &quot;issue-v0.1.4&quot;,\n        &quot;settings&quot;: {\n            &quot;number_of_shards&quot;: 1,\n            &quot;number_of_replicas&quot;: &quot;0&quot;,\n            &quot;refresh_interval&quot;: &quot;300s&quot;,\n            &quot;index&quot;: {\n                &quot;analysis&quot;: {\n                    &quot;analyzer&quot;: {\n                        &quot;nori_korean&quot;:{\n                            &quot;type&quot;: &quot;custom&quot;,\n                            &quot;tokenizer&quot;: &quot;nori_tokenizer&quot;,\n                            &quot;filter&quot;: [\n                                &quot;lowercase&quot;\n                                ]\n                        }\n                    }\n                }\n            }\n        },\n        &quot;mappings&quot; : { \n            &quot;properties&quot;: {\n                &quot;Subject&quot;: {\n                    &quot;type&quot;: &quot;text&quot;,\n                    &quot;analyzer&quot;: &quot;nori_korean&quot;\n                },\n                &quot;Issue Number&quot;: {\n                    &quot;type&quot;: &quot;integer&quot;\n                },\n                &quot;Reporter&quot;: {\n                    &quot;type&quot;: &quot;text&quot;\n                },\n                &quot;Owner&quot;: {\n                    &quot;type&quot;: &quot;text&quot;\n                },\n                &quot;Handler&quot;: {\n                    &quot;type&quot;: &quot;text&quot;\n                },\n                &quot;Registered date&quot;: {\n                    &quot;type&quot;: &quot;date&quot;,\n                    &quot;format&quot;: &quot;yyyy\/MM\/dd HH:mm:ss&quot;\n                },\n                &quot;Date of final order&quot;: {\n                    &quot;type&quot;: &quot;date&quot;,\n                    &quot;format&quot;: &quot;yyyy\/MM\/dd HH:mm:ss&quot;\n                },\n                &quot;Closed Date&quot;: {\n                    &quot;type&quot;: &quot;date&quot;,\n                    &quot;format&quot;: &quot;yyyy\/MM\/dd HH:mm:ss&quot;\n                },\n                &quot;Issue Details&quot;: {\n                    &quot;type&quot;: &quot;text&quot;,\n                    &quot;analyzer&quot;: &quot;nori_korean&quot;\n                },\n                &quot;Action Log&quot;: {\n                    &quot;type&quot;: &quot;text&quot;,\n                    &quot;analyzer&quot;: &quot;nori_korean&quot;\n                },\n                &quot;Category&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Customer&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Module&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Bug Number&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Build No&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;CPU&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;CoreSet&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;CoreSet Apply Version&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Database&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Database Version&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Defect&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Edition&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Error Code&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Error Number&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Expected Version&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Inclusion in CoreSet&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;JDK&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Memory&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Middleware&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Operating System&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Patch No&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Patch Version&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Platform&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Priority&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Product&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Project&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Severity&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Tagging word&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Tool&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Version&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;approved by&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                },\n                &quot;Status&quot;: {\n                    &quot;type&quot;: &quot;keyword&quot;\n                }\n            }\n        }\n}\n&#039;\n<\/code><\/pre>\n<h2>Kibana \uc124\uce58<\/h2>\n<p>\uc774\uac83\ub3c4 \uac19\uc740 \uc704\uce58\uc5d0\uc11c, \ubc14\uc774\ub108\ub9ac\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud558\uace0 \uc555\ucd95\uc744 \ud480\uace0 \uc2e4\ud589.<\/p>\n<pre><code class=\"language-bash\">cd ~\/Elastic\ncurl -O https:\/\/artifacts.elastic.co\/downloads\/kibana\/kibana-7.3.0-darwin-x86_64.tar.gz\ntar -xvzf kibana-7.3.0-darwin-x86_64.tar.gz\nkibana-7.3.0-darwin-x86_64\/bin\/kibana &amp;<\/code><\/pre>\n<p>\ud0a4\ubc14\ub098\ub294 <code><a href=\"http:\/\/localhost:5601\">http:\/\/localhost:5601<\/a><\/code> \uc5d0 \uc811\uadfc\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\uc740 \ud654\uba74\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4. 6 \ubc84\uc804\uacfc \ube44\uad50\ud574\uc11c \ub808\uc774\uc544\uc6c3\uc740 \uadf8\ub300\ub85c\uc774\uc9c0\ub9cc \uc2a4\ud0c0\uc77c\uc774 \uc880 \ubc14\ub00c\uace0 \uae30\ub2a5\ub3c4 \uc880 \ucd94\uac00\ub41c \uac83 \uac19\ub2e4. \uc0ac\uc2e4 Kibana \uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 \uc720\uc77c\ud55c \uae30\ub2a5\uc740 <code>Dev Tools<\/code> \ubfd0\uc774\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/oboki.net\/workspace\/wp-content\/uploads\/2019\/08\/\u1109\u1173\u110f\u1173\u1105\u1175\u11ab\u1109\u1163\u11ba-2019-08-19-\u110b\u1169\u1112\u116e-11.46.14.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uae30\uc874\uc5d0 \ub9cc\ub4e4\uc5c8\ub358 IMS \uac80\uc0c9\uc5d4\uc9c4\uc758 \uc544\uc774\ub514\uc5b4\ub4e4\uc744 \uc815\ub9ac\ud558\uba74\uc11c \ub3d9\uc2dc\uc5d0 Mac\uacfc \uce5c\ud574\uc9c8 \uacb8 Mac \ud658\uacbd\uc73c\ub85c \uc9c4\ud589\ud560 \uc608\uc815. \uadf8\ub9ac\uace0 \uae30\uc874 \uac80\uc0c9\uc5d4\uc9c4\uc740 ELK 6 \ubc84\uc804\uc5d0\uc11c \ub9cc\ub4e4\uc5c8\uc5c8\ub294\ub370 7 \ubc84\uc804\uc5d0\uc11c \uad6c\ud604\ud574\ubcf4\uba70 \ucd5c\uc2e0 \ubc84\uc804 \uccb4\ud5d8\ub3c4 \ud574\ubcf4\ub824\uace0 \ud55c\ub2e4. \uc11c\ubc84\uc5d0 \uc788\ub358 \uc18c\uc2a4\ub4e4\uc744 Mac \ub85c\uceec \ud658\uacbd\uc73c\ub85c \ub0b4\ub824\ubc1b\uc544 \uad6c\ub3d9\ud574\ubcf4\ub824\uace0 \ud588\ub354\ub2c8 index \ub9cc\ub4dc\ub294 \uac83\ubd80\ud130 \ubcc0\uacbd \uc0ac\ud56d\uc774 \uc788\uc5c8\uace0, Search API\uc5d0\ub3c4 type \uad6c\uc870\uac00 \ub4dc\ub514\uc5b4 \uc5c6\uc5b4\uc9c0\uba74\uc11c \ub2ec\ub77c\uc9c4 \ubd80\ubd84\uc774 \ubc14\ub85c \ub208\uc5d0 \ub744\uc5c8\ub2e4. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,159],"tags":[],"class_list":["post-1127","post","type-post","status-publish","format-standard","hentry","category-elasticsearch","category-mac"],"_links":{"self":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/1127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/comments?post=1127"}],"version-history":[{"count":7,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/1127\/revisions"}],"predecessor-version":[{"id":1152,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/posts\/1127\/revisions\/1152"}],"wp:attachment":[{"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/media?parent=1127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/categories?post=1127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oboki.net\/workspace\/wp-json\/wp\/v2\/tags?post=1127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}