{"id":31447,"date":"2019-10-31T21:41:19","date_gmt":"2019-10-31T18:41:19","guid":{"rendered":"https:\/\/prohoster.info\/blog\/analitika-logov-nginx-s-pomoshhyu-amazon-athena-i-cube-js\/"},"modified":"2019-10-31T21:41:19","modified_gmt":"2019-10-31T18:41:19","slug":"analitika-logov-nginx-s-pomoshhyu-amazon-athena-i-cube-js","status":"publish","type":"post","link":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/analitika-logov-nginx-s-pomoshhyu-amazon-athena-i-cube-js","title":{"rendered":"\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 Nginx \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Amazon Athena \u0438 Cube.js","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u044b Nginx \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0438\u043b\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 open-source \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Prometheus + Grafana. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u043b\u0438 real-time \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438, \u043d\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041d\u0430 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043b\u043e\u0433\u043e\u0432 nginx \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0441\u0442\u0435\u0442, \u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435.<\/p>\n<p><\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <noindex><a rel=\"nofollow\" href=\"https:\/\/aws.amazon.com\/athena\/\">Athena<\/a><\/noindex> \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043b\u043e\u0433\u043e\u0432, \u0432\u0437\u044f\u0432 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 Nginx, \u0438 \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0438\u0437 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u044d\u0448\u0431\u043e\u0440\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f open-source \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a cube.js. \u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 Nginx \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Amazon Athena \u0438 Cube.js\" src=\"\/wp-content\/uploads\/2019\/04\/99cdfdb1461adb682d624fb63070cb71.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>TL:DR;<br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/statsbotco.github.io\/cubejs\/nginx-analytics-dashboard\/\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0434\u044d\u0448\u0431\u043e\u0440\u0434<\/a><\/noindex>.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>\u0414\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <noindex><a rel=\"nofollow\" href=\"https:\/\/www.fluentd.org\/\">Fluentd<\/a><\/noindex>, \u0434\u043b\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433\u0430 \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/aws.amazon.com\/kinesis\/data-firehose\/\">AWS Kinesis Data Firehose<\/a><\/noindex> \u0438 <noindex><a rel=\"nofollow\" href=\"https:\/\/aws.amazon.com\/glue\/\">AWS Glue<\/a><\/noindex>, \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u2014 <noindex><a rel=\"nofollow\" href=\"https:\/\/aws.amazon.com\/s3\/\">AWS S3<\/a><\/noindex>. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0441\u0432\u044f\u0437\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u0433\u0438 nginx, \u043d\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u0432\u0435\u043d\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u043e\u0433\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0442\u044d\u043a\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u0432 kinesis \u043d\u0430\u043f\u0440\u044f\u043c\u0438\u043a \u0438\u0437 nginx, \u043c\u0438\u043d\u0443\u044f fluentd, \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c logstash \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e.<\/p>\n<p><\/p>\n<h2 id=\"sobiraem-logi-nginx\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043b\u043e\u0433\u0438 Nginx<\/h2>\n<p><\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043b\u043e\u0433\u0438 Nginx \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">4\/9\/2019 12:58:17 PM1.1.1.1 - - [09\/Apr\/2019:09:58:17 +0000] \"GET \/sign-up HTTP\/2.0\" 200 9168 \"https:\/\/example.com\/sign-in\" \"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/73.0.3683.86 Safari\/537.36\" \"-\"\n4\/9\/2019 12:58:17 PM1.1.1.1 - - [09\/Apr\/2019:09:58:17 +0000] \"GET \/sign-in HTTP\/2.0\" 200 9168 \"https:\/\/example.com\/sign-up\" \"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/73.0.3683.86 Safari\/537.36\" \"-\"<\/code><\/pre>\n<p><\/p>\n<p>\u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c, \u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Nginx, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u043b\u043e\u0433\u0438 \u0432 JSON:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">log_format json_combined escape=json '{ \"created_at\": \"$msec\", '\n            '\"remote_addr\": \"$remote_addr\", '\n            '\"remote_user\": \"$remote_user\", '\n            '\"request\": \"$request\", '\n            '\"status\": $status, '\n            '\"bytes_sent\": $bytes_sent, '\n            '\"request_length\": $request_length, '\n            '\"request_time\": $request_time, '\n            '\"http_referrer\": \"$http_referer\", '\n            '\"http_x_forwarded_for\": \"$http_x_forwarded_for\", '\n            '\"http_user_agent\": \"$http_user_agent\" }';\n\naccess_log  \/var\/log\/nginx\/access.log  json_combined;<\/code><\/pre>\n<p><\/p>\n<h3 id=\"s3-dlya-hraneniya\">S3 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f<\/h3>\n<p><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u043e\u0433\u0438, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c S3. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0442\u0430\u043a \u043a\u0430\u043a Athena \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 S3 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0414\u0430\u043b\u044c\u0448\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u0442\u044c \u043b\u043e\u0433\u0438, \u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0447\u0438\u0441\u0442\u044b\u0439 \u0431\u0430\u043a\u0435\u0442 \u0432 S3, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0421\u0442\u043e\u0438\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u043c \u0440\u0435\u0433\u0438\u043e\u043d\u0435 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 \u0431\u0430\u043a\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e Athena \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u0445.<\/p>\n<p><\/p>\n<h3 id=\"sozdaem-shemu-v-konsoli-athena\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0445\u0435\u043c\u0443 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Athena<\/h3>\n<p><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 Athena \u0434\u043b\u044f \u043b\u043e\u0433\u043e\u0432. \u041e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430 \u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438, \u0438 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Kinesis Firehose. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c Athena \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0443:<\/p>\n<p>\n<b class=\"spoiler_title\">SQL \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/b><\/p>\n<pre><code class=\"sql\">CREATE EXTERNAL TABLE `kinesis_logs_nginx`(\n  `created_at` double, \n  `remote_addr` string, \n  `remote_user` string, \n  `request` string, \n  `status` int, \n  `bytes_sent` int, \n  `request_length` int, \n  `request_time` double, \n  `http_referrer` string, \n  `http_x_forwarded_for` string, \n  `http_user_agent` string)\nROW FORMAT SERDE \n  'org.apache.hadoop.hive.ql.io.orc.OrcSerde' \nSTORED AS INPUTFORMAT \n  'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' \nOUTPUTFORMAT \n  'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'\nLOCATION\n  's3:\/\/&lt;YOUR-S3-BUCKET&gt;'\nTBLPROPERTIES ('has_encrypted_data'='false');<\/code><\/pre>\n<p><\/p>\n<h3 id=\"sozdaem-kinesis-firehose-stream\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c Kinesis Firehose Stream<\/h3>\n<p><\/p>\n<p>Kinesis Firehose \u0437\u0430\u043f\u0438\u0448\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043e\u0442 Nginx, \u0432 S3 \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435, \u0440\u0430\u0437\u0431\u0438\u0432 \u043f\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0413\u0413\u0413\u0413\/\u041c\u041c\/\u0414\u0414\/\u0427\u0427. \u042d\u0442\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 S3 \u0438\u0437 fluentd, \u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c JSON, \u0430 \u044d\u0442\u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0444\u0430\u0439\u043b\u043e\u0432. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 PrestoDB \u0438\u043b\u0438 Athena, JSON \u2014 \u0441\u0430\u043c\u044b\u0439 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0430\u043a \u0447\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c Kinesis Firehose, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c &#171;Create delivery stream&#187;, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c &#171;direct PUT&#187; \u0432 \u043f\u043e\u043b\u0435 &#171;delivery&#187;:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 Nginx \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Amazon Athena \u0438 Cube.js\" src=\"\/wp-content\/uploads\/2019\/04\/9819d4d4582df4a4ee90ccb99e8ced05.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c &#171;Record format conversion&#187; \u2014 &#171;Enabled&#187; \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c &#171;Apache ORC&#187; \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <noindex><a rel=\"nofollow\" href=\"https:\/\/www.slideshare.net\/oom65\/file-format-benchmarks-avro-json-orc-parquet\">Owen O&#8217;Malley<\/a><\/noindex>, \u044d\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f PrestoDB \u0438 Athena. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0445\u0435\u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0432\u044b\u0448\u0435. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e S3 location \u0432 kinesis \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439, \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0445\u0435\u043c\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u043a\u0430\u0436\u0435\u0442\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 S3 location, \u0442\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u044d\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 Nginx \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Amazon Athena \u0438 Cube.js\" src=\"\/wp-content\/uploads\/2019\/04\/e12a8631a7ce349b5b69976988f25180.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c S3 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0431\u0430\u043a\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0440\u0430\u043d\u044c\u0448\u0435. Aws Glue Crawler, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435, \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430\u043c\u0438 \u0432 S3 \u0431\u0430\u043a\u0435\u0442\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0433\u043e \u0432\u0430\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043c.<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 Nginx \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Amazon Athena \u0438 Cube.js\" src=\"\/wp-content\/uploads\/2019\/04\/a831f654b64e00d049e168636abed810.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0430\u0448\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u0436\u0430\u0442\u0438\u0435 S3 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e, \u043d\u043e ORC \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0441\u0436\u0430\u0442\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p><\/p>\n<h3 id=\"fluentd\">Fluentd<\/h3>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u043e\u0432, \u043d\u0430\u0434\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <noindex><a rel=\"nofollow\" href=\"https:\/\/www.fluentd.org\/\">Fluentd<\/a><\/noindex>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u043b\u044e\u0431\u043b\u044e Ruby, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Logstash \u0438\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u0433\u0438 \u0432 kinesis \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. Fluentd \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438, \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e docker, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e. <\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 fluent.conf. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 source:<\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/users\/type\/\" class=\"user_link\">type<\/a><\/noindex> forward<br \/>\nport 24224<br \/>\nbind 0.0.0.0<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Fluentd \u0441\u0435\u0440\u0432\u0435\u0440. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f, \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/hub.docker.com\/r\/fluent\/fluentd\/\">Docker Hub<\/a><\/noindex> \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0433\u0430\u0439\u0434, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0437.<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ docker run \n  -d \n  -p 24224:24224 \n  -p 24224:24224\/udp \n  -v \/data:\/fluentd\/log \n  -v &lt;PATH-TO-FLUENT-CONF&gt;:\/fluentd\/etc fluentd \n  -c \/fluentd\/etc\/fluent.conf\n  fluent\/fluentd:stable<\/code><\/pre>\n<p><\/p>\n<p>\u042d\u0442\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0443\u0442\u044c <code>\/fluentd\/log<\/code> \u0434\u043b\u044f \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u043e\u0432 \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439. \u041c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043d\u0435\u043f\u043e\u0441\u0438\u043b\u044c\u043d\u044b\u043c \u0442\u0440\u0443\u0434\u043e\u043c. \u041f\u043e\u0440\u0442 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439, 24224 \u2014 \u044d\u0442\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 Fluentd.<\/p>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 Fluentd, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u0443\u0434\u0430 \u043b\u043e\u0433\u0438 Nginx. \u041c\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Nginx \u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 Docker \u0435\u0441\u0442\u044c \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043b\u043e\u0433\u043e\u0432 \u0434\u043b\u044f Fluentd:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ docker run \n--log-driver=fluentd \n--log-opt fluentd-address=&lt;FLUENTD-SERVER-ADDRESS&gt;\n--log-opt tag=\"{{.Name}}\" \n-v \/some\/content:\/usr\/share\/nginx\/html:ro \n-d \nnginx<\/code><\/pre>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 Nginx \u0438\u043d\u0430\u0447\u0435, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433-\u0444\u0430\u0439\u043b\u044b, \u0432 Fluentd \u0435\u0441\u0442\u044c <noindex><a rel=\"nofollow\" href=\"https:\/\/docs.fluentd.org\/v1.0\/articles\/in_tail\">file tail plugin<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Fluent \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u043b\u043e\u0433\u043e\u0432, \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435:<\/p>\n<p><\/p>\n<pre><code class=\"xml\">&lt;filter YOUR-NGINX-TAG.*&gt;\n  @type parser\n  key_name log\n  emit_invalid_record_to_error false\n  &lt;parse&gt;\n    @type json\n  &lt;\/parse&gt;\n&lt;\/filter&gt;<\/code><\/pre>\n<p><\/p>\n<p>\u0418 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043b\u043e\u0433\u043e\u0432 \u0432 Kinesis, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/awslabs\/aws-fluent-plugin-kinesis\">kinesis firehose plugin<\/a><\/noindex>:<\/p>\n<p><\/p>\n<pre><code class=\"xml\">&lt;match YOUR-NGINX-TAG.*&gt;\n    @type kinesis_firehose\n    region region\n    delivery_stream_name &lt;YOUR-KINESIS-STREAM-NAME&gt;\n    aws_key_id &lt;YOUR-AWS-KEY-ID&gt;\n    aws_sec_key &lt;YOUR_AWS-SEC_KEY&gt;\n&lt;\/match&gt;<\/code><\/pre>\n<p><\/p>\n<h2 id=\"athena\">Athena<\/h2>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438, \u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Kinesis \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437 \u0432 10 \u043c\u0438\u043d\u0443\u0442) \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043b\u043e\u0433\u043e\u0432 \u0432 S3. \u0412 \u043c\u0435\u043d\u044e &#171;monitoring&#187; Kinesis Firehose \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 S3, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0434\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0431\u0430\u043a\u0435\u0442 S3 \u0434\u043b\u044f \u0440\u043e\u043b\u0438 Kinesis. \u0415\u0441\u043b\u0438 Kinesis \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433 \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c, \u043e\u043d \u0441\u043b\u043e\u0436\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0442\u043e\u043c \u0436\u0435 \u0431\u0430\u043a\u0435\u0442\u0435.<\/p>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Athena. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0439\u0434\u0435\u043c \u0441\u0432\u0435\u0436\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u0442\u0434\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<p><\/p>\n<pre><code class=\"sql\">SELECT * FROM \"db_name\".\"table_name\" WHERE status &gt; 499 ORDER BY created_at DESC limit 10;<\/code><\/pre>\n<p><\/p>\n<h3 id=\"skanirovanie-vseh-zapisey-na-kazhdyy-zapros\">\u0421\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/h3>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0438 \u043b\u043e\u0433\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u044b \u0432 S3 \u0432 ORC, \u0441\u0436\u0430\u0442\u044b \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443. Kinesis Firehose \u0434\u0430\u0436\u0435 \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u043b \u0438\u0445 \u043f\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u043e\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043d\u0435 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0430, Athena \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u0437\u0430 \u0440\u0435\u0434\u043a\u0438\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c. \u042d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c:<\/p>\n<p><\/p>\n<ul>\n<li>\u041e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442, \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b;<\/li>\n<li>\u0421\u0447\u0435\u0442 \u0437\u0430 Athena \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0431\u044a\u0435\u043c\u0430 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c 10 \u041c\u0411 \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441. <\/li>\n<\/ul>\n<p><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c AWS Glue Crawler, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 S3 \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u0445 \u0432 Glue Metastore. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 \u043a\u0430\u043a \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0432 Athena, \u0438 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435. <\/p>\n<p><\/p>\n<h3 id=\"nastraivaem-amazon-glue-crawler\">\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c Amazon Glue Crawler<\/h3>\n<p><\/p>\n<p>Amazon Glue Crawler \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 S3 \u0431\u0430\u043a\u0435\u0442\u0435 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c\u0438. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 Glue Crawler \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 AWS Glue \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0431\u0430\u043a\u0435\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u043a\u0440\u0430\u0443\u043b\u0435\u0440 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0431\u0430\u043a\u0435\u0442\u043e\u0432, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u043c\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u0431\u0430\u043a\u0435\u0442\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Crawler \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0434\u0438\u043d Crawler \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441.<\/p>\n<p><\/p>\n<h3 id=\"particirovannye-tablicy\">\u041f\u0430\u0440\u0442\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/h3>\n<p><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u0440\u0430\u0443\u043b\u0435\u0440\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445, \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u0430\u043a\u0435\u0442\u0430. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c Athena \u0438 \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u043b\u043e\u0433\u0430\u043c\u0438 Nginx. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c:<\/p>\n<p><\/p>\n<pre><code class=\"sql\">SELECT * FROM \"default\".\"part_demo_kinesis_bucket\"\nWHERE(\n  partition_0 = '2019' AND\n  partition_1 = '04' AND\n  partition_2 = '08' AND\n  partition_3 = '06'\n  );<\/code><\/pre>\n<p><\/p>\n<p>\u042d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0431\u0435\u0440\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441 6 \u0434\u043e 7 \u0443\u0442\u0440\u0430 8 \u0430\u043f\u0440\u0435\u043b\u044f 2019 \u0433\u043e\u0434\u0430. \u041d\u043e \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 \u043d\u0435-\u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u0437\u043d\u0430\u0435\u043c \u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u0442\u0435 \u0436\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0432 \u0438\u0445 \u043f\u043e \u0442\u0430\u0439\u043c\u0441\u0442\u0435\u043c\u043f\u0443:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 Nginx \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Amazon Athena \u0438 Cube.js\" src=\"\/wp-content\/uploads\/2019\/04\/b29bce6ecc840436f03d9f23d016a638.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>3.59 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438 244.34 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0434\u0435\u043b\u044f \u043b\u043e\u0433\u043e\u0432. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c:<\/p>\n<p><\/p>\n<p><img decoding=\"async\" alt=\"\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 Nginx \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Amazon Athena \u0438 Cube.js\" src=\"\/wp-content\/uploads\/2019\/04\/2defb358fa3f2c62201d82daa7a3fb7e.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><\/p>\n<p>\u0427\u0443\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043d\u043e \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u2014 \u0432\u0441\u0435\u0433\u043e 1.23 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445! \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u0435\u0441\u043b\u0438 \u0431\u044b \u043d\u0435 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 10 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442 \u0437\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u043f\u0440\u0430\u0439\u0441\u0438\u043d\u0433\u0435. \u041d\u043e \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0443\u0447\u0448\u0435, \u0430 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u043a\u0443\u0434\u0430 \u0431\u043e\u043b\u0435\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u044f\u044e\u0449\u0435\u0439.<\/p>\n<p><\/p>\n<h2 id=\"sobiraem-deshbord-s-pomoschyu-cubejs\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u044d\u0448\u0431\u043e\u0440\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Cube.js<\/h2>\n<p><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a Cube.js. \u0423 \u043d\u0435\u0433\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u043e \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0434\u0432\u0435: \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u043f\u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c \u0438 \u043f\u0440\u0435-\u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0445\u0435\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 <noindex><a rel=\"nofollow\" href=\"https:\/\/cube.dev\/docs\/getting-started-cubejs-schema\">data schema<\/a><\/noindex>, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u043d\u0430 Javascript, \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u043d\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c SQL \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0442 \u043d\u0430\u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c \u0432 \u0441\u0445\u0435\u043c\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Cube.js. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c AWS-\u0441\u0442\u044d\u043a, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Lambda \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c express-\u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438, \u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0445\u043e\u0441\u0442\u0438\u0442\u044c Cube.js \u0431\u044d\u043a\u0435\u043d\u0434 \u0432 Heroku \u0438\u043b\u0438 Docker. \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0440\u0443\u0433\u0438\u0435 <noindex><a rel=\"nofollow\" href=\"https:\/\/cube.dev\/docs\/deployment\">\u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0430<\/a><\/noindex>.<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ npm install -g cubejs-cli\n$ cubejs create nginx-log-analytics -t serverless -d athena<\/code><\/pre>\n<p><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 cube.js \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0444\u0430\u0439\u043b .env, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f <noindex><a rel=\"nofollow\" href=\"https:\/\/cube.dev\/docs\/connecting-to-the-database#notes-aws-athena\">Athena<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <noindex><a rel=\"nofollow\" href=\"https:\/\/cube.dev\/docs\/getting-started-cubejs-schema\">\u0441\u0445\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/a><\/noindex>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0443\u043a\u0430\u0436\u0435\u043c, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430\u0448\u0438 \u043b\u043e\u0433\u0438. \u0422\u0430\u043c \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u043e\u0432.<\/p>\n<p><\/p>\n<p>\u0412 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>schema<\/code>, \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>Logs.js<\/code>. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f nginx:<\/p>\n<p>\n<b class=\"spoiler_title\">\u041a\u043e\u0434 \u043c\u043e\u0434\u0435\u043b\u0438<\/b><\/p>\n<pre><code class=\"javascript\">const partitionFilter = (from, to) =&gt; `\n    date(from_iso8601_timestamp(${from})) &lt;= date_parse(partition_0 || partition_1 || partition_2, '%Y%m%d') AND\n    date(from_iso8601_timestamp(${to})) &gt;= date_parse(partition_0 || partition_1 || partition_2, '%Y%m%d')\n    `\n\ncube(`Logs`, {\n  sql: `\n  select * from part_demo_kinesis_bucket\n  WHERE ${FILTER_PARAMS.Logs.createdAt.filter(partitionFilter)}\n  `,\n\n  measures: {\n    count: {\n      type: `count`,\n    },\n\n    errorCount: {\n      type: `count`,\n      filters: [\n        { sql: `${CUBE.isError} = 'Yes'` }\n      ]\n    },\n\n    errorRate: {\n      type: `number`,\n      sql: `100.0 * ${errorCount} \/ ${count}`,\n      format: `percent`\n    }\n  },\n\n  dimensions: {\n    status: {\n      sql: `status`,\n      type: `number`\n    },\n\n    isError: {\n      type: `string`,\n      case: {\n        when: [{\n          sql: `${CUBE}.status &gt;= 400`, label: `Yes`\n        }],\n        else: { label: `No` }\n      }\n    },\n\n    createdAt: {\n      sql: `from_unixtime(created_at)`,\n      type: `time`\n    }\n  }\n});<\/code><\/pre>\n<p><\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <noindex><a rel=\"nofollow\" href=\"https:\/\/cube.dev\/docs\/cube#context-variables-filter-params\">FILTER_PARAMS<\/a><\/noindex>, \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c SQL \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u043c \u043f\u043e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044f\u043c.<\/p>\n<p><\/p>\n<p>\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u043c \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u0438\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043d\u0430 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0435, \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0435-\u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438. Cube.js \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043f\u0440\u0435-\u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043c\u0435\u0440\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043d\u043e \u0438 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Athena.<\/p>\n<p><\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0444\u0430\u0439\u043b \u0441\u0445\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p><\/p>\n<pre><code class=\"javascript\">preAggregations: {\n  main: {\n    type: `rollup`,\n    measureReferences: [count, errorCount],\n    dimensionReferences: [isError, status],\n    timeDimensionReference: createdAt,\n    granularity: `day`,\n    partitionGranularity: `month`,\n    refreshKey: {\n      sql: FILTER_PARAMS.Logs.createdAt.filter((from, to) =&gt; \n        `select\n           CASE WHEN from_iso8601_timestamp(${to}) + interval '3' day &gt; now()\n           THEN date_trunc('hour', now()) END`\n      )\n    }\n  }\n}<\/code><\/pre>\n<p><\/p>\n<p>\u041c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432 \u044d\u0442\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435-\u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043c\u0435\u0442\u0440\u0438\u043a, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043c\u0435\u0441\u044f\u0446\u0430\u043c. <noindex><a rel=\"nofollow\" href=\"https:\/\/cube.dev\/docs\/pre-aggregations#rollup-time-partitioning\">\u041f\u0430\u0440\u0442\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435-\u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0439 <\/a><\/noindex> \u043c\u043e\u0436\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0441\u0431\u043e\u0440 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u044d\u0448\u0431\u043e\u0440\u0434!<\/p>\n<p><\/p>\n<p>\u0411\u044d\u043a\u0435\u043d\u0434 Cube.js \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <noindex><a rel=\"nofollow\" href=\"https:\/\/cube.dev\/docs\/rest-api\">REST API<\/a><\/noindex> \u0438 \u043d\u0430\u0431\u043e\u0440 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432. \u041c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f React-\u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0430. Cube.js \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043b\u0438\u0448\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u2014 \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f <noindex><a rel=\"nofollow\" href=\"http:\/\/recharts.org\/\">recharts<\/a><\/noindex>, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e.<\/p>\n<p><\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 Cube.js \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 <noindex><a rel=\"nofollow\" href=\"https:\/\/cube.dev\/docs\/query-format\">JSON \u0444\u043e\u0440\u043c\u0430\u0442\u0435<\/a><\/noindex>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u0442\u0434\u0430\u043b Nginx \u043f\u043e \u0434\u043d\u044f\u043c, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<p><\/p>\n<pre><code class=\"json\">{\n  \"measures\": [\"Logs.errorCount\"],\n  \"timeDimensions\": [\n    {\n      \"dimension\": \"Logs.createdAt\",\n      \"dateRange\": [\"2019-01-01\", \"2019-01-07\"],\n      \"granularity\": \"day\"\n    }\n  ]\n}<\/code><\/pre>\n<p><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c Cube.js \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 React-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 NPM:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ npm i --save @cubejs-client\/core @cubejs-client\/react<\/code><\/pre>\n<p><\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u0442\u043d\u044b <code>cubejs<\/code> \u0438 <code>QueryRenderer<\/code>, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u044d\u0448\u0431\u043e\u0440\u0434:<\/p>\n<p>\n<b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0430<\/b><\/p>\n<pre><code class=\"javascript\">import React from 'react';\nimport { LineChart, Line, XAxis, YAxis } from 'recharts';\nimport cubejs from '@cubejs-client\/core';\nimport { QueryRenderer } from '@cubejs-client\/react';\n\nconst cubejsApi = cubejs(\n  'YOUR-CUBEJS-API-TOKEN',\n  { apiUrl: 'http:\/\/localhost:4000\/cubejs-api\/v1' },\n);\n\nexport default () =&gt; {\n  return (\n    &lt;QueryRenderer\n      query={{\n        measures: ['Logs.errorCount'],\n        timeDimensions: [{\n            dimension: 'Logs.createdAt',\n            dateRange: ['2019-01-01', '2019-01-07'],\n            granularity: 'day'\n        }]\n      }}\n      cubejsApi={cubejsApi}\n      render={({ resultSet }) =&gt; {\n        if (!resultSet) {\n          return 'Loading...';\n        }\n\n        return (\n          &lt;LineChart data={resultSet.rawData()}&gt;\n            &lt;XAxis dataKey=\"Logs.createdAt\"\/&gt;\n            &lt;YAxis\/&gt;\n            &lt;Line type=\"monotone\" dataKey=\"Logs.errorCount\" stroke=\"#8884d8\"\/&gt;\n          &lt;\/LineChart&gt;\n        );\n      }}\n    \/&gt;\n  )\n}<\/code><\/pre>\n<p><\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/codesandbox.io\/s\/l5qyrzlw07?fontsize=14\">CodeSandbox<\/a><\/noindex>.<\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/447886\/\">habr.com<\/a><\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u044b Nginx \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0438\u043b\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 open-source \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Prometheus + Grafana. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u043b\u0438 real-time \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438, \u043d\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041d\u0430 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043b\u043e\u0433\u043e\u0432 nginx \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0441\u0442\u0435\u0442, \u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":23391,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-31447","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041e\u0431\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u044b Nginx \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0438\u043b\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 open-source \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Prometheus + Grafana. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u043b\u0438 real-time \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438, \u043d\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041d\u0430 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043b\u043e\u0433\u043e\u0432 nginx \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0441\u0442\u0435\u0442, \u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/analitika-logov-nginx-s-pomoshhyu-amazon-athena-i-cube-js\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"de_DE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 Nginx \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Amazon Athena \u0438 Cube.js | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041e\u0431\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u044b Nginx \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0438\u043b\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 open-source \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Prometheus + Grafana. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u043b\u0438 real-time \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438, \u043d\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041d\u0430 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043b\u043e\u0433\u043e\u0432 nginx \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0441\u0442\u0435\u0442, \u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/analitika-logov-nginx-s-pomoshhyu-amazon-athena-i-cube-js\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:41:19+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:41:19+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Nginx-Log-Analyse mit Amazon Athena und Cube.js | ProHoster","description":"F\u00fcr die \u00dcberwachung und Analyse von Nginx kommen normalerweise kommerzielle Produkte oder fertige Open-Source-Alternativen wie Prometheus + Grafana zum Einsatz. Dies ist eine gute Option f\u00fcr die \u00dcberwachung oder Echtzeitanalytik, jedoch weniger geeignet f\u00fcr historische Analysen. Auf jeder popul\u00e4ren Plattform wachsen die Datenmengen aus den Nginx-Logs schnell, und um gro\u00dfe Datenmengen zu analysieren, ist es sinnvoll, etwas Effektiveres zu verwenden.","canonical_url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/analitika-logov-nginx-s-pomoshhyu-amazon-athena-i-cube-js","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"de_DE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u043e\u0432 Nginx \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Amazon Athena \u0438 Cube.js | ProHoster","og:description":"\u041e\u0431\u044b\u0447\u043d\u043e \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u044b Nginx \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0438\u043b\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0435 open-source \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Prometheus + Grafana. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438\u043b\u0438 real-time \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438, \u043d\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041d\u0430 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043b\u043e\u0433\u043e\u0432 nginx \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0441\u0442\u0435\u0442, \u0438 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435","og:url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/analitika-logov-nginx-s-pomoshhyu-amazon-athena-i-cube-js","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:41:19+00:00","article:modified_time":"2019-10-31T18:41:19+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"31447","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 06:14:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 11:56:01","updated":"2026-01-21 06:14:19"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/31447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/comments?post=31447"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/31447\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media\/23391"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media?parent=31447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/categories?post=31447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/tags?post=31447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}