{"id":1380,"date":"2023-03-19T10:55:33","date_gmt":"2023-03-19T02:55:33","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1380"},"modified":"2023-04-28T21:12:33","modified_gmt":"2023-04-28T13:12:33","slug":"kibana-add-filter","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/19\/kibana-add-filter\/","title":{"rendered":"Kibana\u6dfb\u52a0filter"},"content":{"rendered":"<h2>\u5b57\u6bb5\u751f\u6210<\/h2>\n<h3>\u81ea\u52a8\u540c\u6b65ES mapping<\/h3>\n<p><!-- more --><\/p>\n<h3>\u624b\u52a8\u6dfb\u52a0ES mapping<\/h3>\n<p>\uff081\uff09\u6dfb\u52a0loglvl\u5b57\u6bb5<\/p>\n<pre><code>POST thaipay\/_mappings\n{\n  &quot;properties&quot;: {\n    &quot;loglvl&quot;: {\n      &quot;type&quot;: &quot;text&quot;,\n      &quot;fields&quot;: {\n          &quot;keyword&quot;: {\n            &quot;type&quot;: &quot;keyword&quot;,\n            &quot;ignore_above&quot;: 16\n          }\n        }\n    }\n  }\n}<\/code><\/pre>\n<p>\uff082\uff09\u6dfb\u52a0appname\u5b57\u6bb5<\/p>\n<pre><code>POST thaipay\/_mappings\n{\n  &quot;properties&quot;: {\n    &quot;appname&quot;: {\n      &quot;type&quot;: &quot;text&quot;,\n      &quot;fields&quot;: {\n          &quot;keyword&quot;: {\n            &quot;type&quot;: &quot;keyword&quot;,\n            &quot;ignore_above&quot;: 128\n          }\n        }\n    }\n  }\n}<\/code><\/pre>\n<p>\uff083\uff09\u6dfb\u52a0traceid\u5b57\u6bb5<\/p>\n<pre><code>POST thaipay\/_mappings\n{\n  &quot;properties&quot;: {\n    &quot;traceid&quot;: {\n      &quot;type&quot;: &quot;text&quot;,\n      &quot;fields&quot;: {\n          &quot;keyword&quot;: {\n            &quot;type&quot;: &quot;keyword&quot;,\n            &quot;ignore_above&quot;: 32\n          }\n        }\n    }\n  }\n}<\/code><\/pre>\n<p>\uff084\uff09\u67e5\u8be2\u5b57\u6bb5<\/p>\n<pre><code>GET thaipay\/_mappings\nGET thaipay\/_mapping\/field\/appname<\/code><\/pre>\n<h3>\u5237\u65b0\u5b57\u6bb5<\/h3>\n<p>\u6253\u5f00Kibana -&gt; <code>Management<\/code> -&gt; <code>Kibana<\/code> -&gt; <code>Index Patterns<\/code> -&gt; \u9009\u62e9Index -&gt; \u53f3\u4e0a\u89d2\u5237\u65b0\u56fe\u6807<code>Refresh field list<\/code><\/p>\n<h2>\u8fc7\u6ee4\u5b57\u6bb5<\/h2>\n<p>\u6253\u5f00Kibana -&gt; <code>Discover<\/code> -&gt; <code>Add filter<\/code> -&gt; \u9009\u62e9<code>Filed<\/code>\u548c<code>Operator<\/code>\uff0c\u5982<\/p>\n<p>Field\u4e3a<code>appname.keyword<\/code>\uff0cOperator\u4e3a<code>is<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b57\u6bb5\u751f\u6210 \u81ea\u52a8\u540c\u6b65ES mapping \u624b\u52a8\u6dfb\u52a0ES mapping \uff081\uff09\u6dfb\u52a0loglvl\u5b57\u6bb5 POST t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[345],"tags":[344],"class_list":["post-1380","post","type-post","status-publish","format-standard","hentry","category-elk","tag-kibana"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1380"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1380\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}