{"id":9706,"date":"2017-01-04T11:08:56","date_gmt":"2017-01-04T02:08:56","guid":{"rendered":"http:\/\/www.skyarch.net\/blog\/?p=9706"},"modified":"2017-01-04T11:08:56","modified_gmt":"2017-01-04T02:08:56","slug":"amazon-elasticsearch-service%e3%81%aekibana%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%82%92%e8%87%aa%e5%88%86%e3%81%a7%e5%ae%9a%e7%be%a9","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/amazon-elasticsearch-service%e3%81%aekibana%e3%81%a7%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%91%e3%82%bf%e3%83%bc%e3%83%b3%e3%82%92%e8%87%aa%e5%88%86%e3%81%a7%e5%ae%9a%e7%be%a9\/","title":{"rendered":"Amazon Elasticsearch Service\u306eKibana\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30d1\u30bf\u30fc\u30f3\u3092\u81ea\u5206\u3067\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u5e45\u5e83\u3044\u8996\u91ce\u3092\u6301\u3064\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u76ee\u6307\u3057\u3066\u3044\u307e\u3059\u7530\u4e2d\u3068\u7533\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306fAmazon Elasticsearch Service\u306eKibana(4.1.2-es2.0)\u3092\u4f7f\u3063\u3066\u3044\u3066\u3076\u3064\u304b\u3063\u305f\u554f\u984c\u306e\u89e3\u6c7a\u65b9\u6cd5\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h1>\u76ee\u7684<\/h1>\n<p>Kibana\u3092\u4f7f\u7528\u3057\u3001IoT\u30c7\u30d0\u30a4\u30b9\u306e\u30bb\u30f3\u30b5\u5024\uff08TI\u793e\u30bb\u30f3\u30b5\u30fc\u30bf\u30b0\uff09\u3092\u53ef\u8996\u5316\u3059\u308b\u3002<\/p>\n<h1>\u3084\u3063\u3066\u307f\u305f\u4e8b<\/h1>\n<p>Kibana\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u983c\u3089\u305a\u3001\u81ea\u5206\u3067\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30d1\u30bf\u30fc\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3002<\/p>\n<h1>\u304d\u3063\u304b\u3051<\/h1>\n<p>Kibana\u3067IoT\u30c7\u30d0\u30a4\u30b9\u306e\u30bb\u30f3\u30b5\u5024\u3092\u53ef\u8996\u5316\u3057\u3066\u8868\u793a\u3057\u3088\u3046\u3068\u8a66\u307f\u305f\u304c\u3001Kibana\u304c\u65e5\u4ed8\u578b\u3092\u81ea\u52d5\u8a8d\u8b58\u3057\u3066\u304f\u308c\u306a\u304b\u3063\u305f\u308a\u3001\u30bb\u30f3\u30b5\u5024\u3092\u6587\u5b57\u5217\u578b\u3068\u3057\u3066\u8a8d\u8b58\u3057\u3066\u3057\u307e\u3044\u3001\u30b0\u30e9\u30d5\u306e\u8ef8\u3068\u3057\u3066\u6307\u5b9a\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u8d77\u3053\u3063\u305f\u3002(\u753b\u50cf\u53c2\u7167)<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2016\/12\/2016-12-26_15h36_58.png\" alt=\"Kibana\u304c\u578b\u3092\u8aa4\u3063\u3066\u3057\u307e\u3046\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2016\/12\/2016-12-26_15h38_04.png\" alt=\"Y\u8ef8\u3068\u3057\u3066\u6307\u5b9a\u3067\u304d\u306a\u3044\" \/><\/p>\n<h1>json\u3092\u8a18\u8ff0\u3057\u3066\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30d1\u30bf\u30fc\u30f3\u3092\u5b9a\u7fa9\u3059\u308b<\/h1>\n<p>\u30de\u30c3\u30d4\u30f3\u30b0\u5b9a\u7fa9\u3092\u66f8\u3044\u305fjson\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<pre>{\n    \"properties\": {\n        \"a0:e6:f8:af:2a:05\": {\n            \"properties\": {\n                \"accelerometer_x\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"accelerometer_y\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"accelerometer_z\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"ambient_temperature\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"battery_level\": {\n                    \"type\": \"long\",\n                    \"index\": \"analyzed\"\n                },\n                \"date\": {\n                    \"type\": \"date\",\n                    \"format\": \"strict_date_optional_time||epoch_millis\"\n                },\n                \"gyroscope_x\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"gyroscope_y\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"gyroscope_z\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"luxometer\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"magnetometer_x\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"magnetometer_y\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"magnetometer_z\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"object_temperature\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"raw_humidity\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"raw_temperature\": {\n                    \"type\": \"float\",\n                    \"index\": \"analyzed\"\n                },\n                \"rssi_level\": {\n                    \"type\": \"long\",\n                    \"index\": \"analyzed\"\n                }\n            }\n        }\n    }\n}\n<\/pre>\n<p>https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/indices-templates.html\u3092\u898b\u306a\u304c\u3089\u81ea\u5206\u3067\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u5c11\u3057\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<blockquote><p>\/* \u30c7\u30fc\u30bf\u306e\u578b\u3092\u660e\u793a\u3059\u308b\u3002https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/mapping-types.html\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 *\/<br \/>\n\"type\": \"float\"<\/p>\n<p>\/* \u30c7\u30fc\u30bf\u306e\u8981\u7d20\u89e3\u6790\u3092\u884c\u3046\u304b\u3069\u3046\u304b\u3001\u6587\u5b57\u5217\u3068\u3057\u3066\u90e8\u5206\u4e00\u81f4\u691c\u7d22\u3092\u884c\u3046\u5834\u5408\u306f\"analyzed\"\u306b\u3057\u3066\u304a\u304f\u3002\u8a73\u3057\u304f\u306fhttps:\/\/www.elastic.co\/guide\/en\/elasticsearch\/guide\/current\/mapping-intro.html *\/<br \/>\n\"index\": \"analyzed\"<\/p>\n<p>\/* \u6642\u523b\u5f62\u5f0f\u3068\u3057\u3066\u53d7\u3051\u4ed8\u3051\u308b\u8868\u73fe\u3092\u660e\u793a\u3059\u308b\u3001\u8907\u6570\u6307\u5b9a\u3082\u53ef\u80fd\u3002moment.js(http:\/\/momentjs.com\/)\u4e92\u63db\u306e\u6642\u523b\u5f62\u5f0f\u304c\u6307\u5b9a\u3067\u304d\u308b\u3002\u8a73\u7d30\u306fhttps:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/mapping-date-format.html *\/<br \/>\n\"format\": \"strict_date_optional_time||epoch_millis\"<\/p><\/blockquote>\n<h1>\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30d1\u30bf\u30fc\u30f3\u3092\u8a2d\u5b9a\u3059\u308b<\/h1>\n<p>curl\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3057\u3066Elasticsearch\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30d1\u30bf\u30fc\u30f3\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre># curl -XPUT 'http:\/\/search-skyarch-elasticsearch2-xxxxxxxxxxxxxxxxxxxxxxxxxx.ap-northeast-1.es.amazonaws.com\/test\/_mapping\/sensor' -d @mapping.json<\/pre>\n<p>\u30fb\u30fb\u30fb\u3068\u3059\u308b\u3068<\/p>\n<pre>{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"mapper [a0:e6:f8:af:2a:05.accelerometer_x] of different type, current_type [string], merged_type [float]\"}], \"status\":400}<\/pre>\n<p>\u3068\u6012\u3089\u308c\u307e\u3059\u3002\u3069\u3046\u3084\u3089\u65e2\u5b58\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u5bfe\u3057\u3066\u9069\u7528\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u3088\u3046\u3067\u3059\u3002\u306a\u306e\u3067\u3001\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3067\u7a7a\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u65b0\u3057\u304f\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre># curl -XPUT 'http:\/\/search-skyarch-elasticsearch2-xxxxxxxxxxxxxxxxxxxxxxxxxx.ap-northeast-1.es.amazonaws.com\/test2\/'<\/pre>\n<p>\u518d\u3073\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30d1\u30bf\u30fc\u30f3\u306e\u8a2d\u5b9a\u3092\u8a66\u307f\u307e\u3059\u3002<\/p>\n<pre># curl -XPUT 'http:\/\/search-skyarch-elasticsearch2-xxxxxxxxxxxxxxxxxxxxxxxxxx.ap-northeast-1.es.amazonaws.com\/test2\/_mapping\/sensor' -d @mapping.json<\/pre>\n<p>\u3059\u308b\u3068\u30fb\u30fb\u30fb<\/p>\n<pre>{\"acknowledged\":true}<\/pre>\n<p>\u3068\u8fd4\u3063\u3066\u304d\u3066\u7121\u4e8b\u8a2d\u5b9a\u3067\u304d\u307e\u3057\u305f\uff01<br \/>\n\u305f\u3060\u3057\u3001\u3053\u306e\u65b9\u6cd5\u306f\u65e5\u4ed8\u304b\u3089\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u8a2d\u5b9a\u306b\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u4e00\u65e5\u304a\u304d\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30d1\u30bf\u30fc\u30f3\u3092\u4f5c\u3089\u306a\u3051\u308c\u3070\u306a\u3089\u305a\u3001\u5b9f\u904b\u7528\u306b\u306f\u5411\u304b\u306a\u3044\u306e\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h1>\u518d\u6311\u6226<\/h1>\n<p>\u4e0a\u624b\u304f\u3044\u304f\u3067\u3057\u3087\u3046\u304b\u30fb\u30fb\u30fb\uff1f<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2016\/12\/2016-12-26_17h50_34.png\" alt=\"\u6b63\u3057\u3044\u89e3\u91c8\u7d50\u679c\" \/><\/p>\n<p>\u5927\u6210\u529f\u3067\u3059\uff01<\/p>\n<h1>\u756a\u5916\u7de8<\/h1>\n<p>\u305d\u308c\u3067\u306f\u3001\u793e\u5185\u3067\u3082\u8ca7\u4e4f\u3086\u3059\u308a\u304c\u9177\u3044\u3053\u3068\u3067\u6709\u540d\u306a\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u819d\u306b\u30bb\u30f3\u30b5\u3092\u8a2d\u7f6e\u3001\u8ca7\u4e4f\u3086\u3059\u308a\u306eBPM\u3092\u8a08\u308a\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2016\/12\/2016-12-26_18h07_45._edited.png\" alt=\"\u8ca7\u4e4f\u3086\u3059\u308a\u306e\u9177\u3044\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u632f\u52d5\u306e\u6ce2\u5f62\" \/><br \/>\n\u4eca\u65e5\u3082\u4eca\u65e5\u3068\u3066\u3053\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u306f319[\u30df\u30ea\u79d2\/\u56de]=3.135[\u56de\/\u79d2]=188[BPM]\u3067\u8ca7\u4e4f\u3086\u3059\u308a\u3092\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\uff01<\/p>\n<p>\u8a18\u4e8b\u306f\u4ee5\u4e0a\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3053\u306e\u305f\u3073\u306f\u3054\u89a7\u6234\u304d\u3001\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3001\u5e45\u5e83\u3044\u8996\u91ce\u3092\u6301\u3064\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u76ee\u6307\u3057\u3066\u3044\u307e\u3059\u7530\u4e2d\u3068\u7533\u3057\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306fAmazon Elasticsearch Service\u306eKibana(4.1.2-es2.0)\u3092\u4f7f\u3063\u3066\u3044\u3066\u3076\u3064\u304b\u3063\u305f\u554f\u984c\u306e\u89e3\u6c7a\u65b9\u6cd5\u3092\u898b&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9771,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"9706","footnotes":""},"categories":[20,194,115,195,29],"tags":[199,200,201,202,102,208,197,156,206,207,104,205,204,203,36,211,210,198,209],"class_list":{"0":"post-9706","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-aws","8":"category-elasticsearch","9":"category-iot","10":"category-kibana","11":"category-linux","12":"tag-amazon-aws","13":"tag-amazon-elasticsearch","14":"tag-amazon-es","15":"tag-amazon-web-service","16":"tag-aws","17":"tag-bi","18":"tag-elasticsearch","19":"tag-it","20":"tag-kibana","21":"tag-kibana4","22":"tag-linux","23":"tag-lucene","24":"tag-moment-js","25":"tag-node-js","26":"tag-tips","27":"tag-211","28":"tag-210","29":"tag-198","30":"tag-209","31":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/9706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=9706"}],"version-history":[{"count":4,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/9706\/revisions"}],"predecessor-version":[{"id":9879,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/9706\/revisions\/9879"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/9771"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=9706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=9706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=9706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}