{"id":582,"date":"2018-02-01T08:41:26","date_gmt":"2018-02-01T00:41:26","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=582"},"modified":"2018-02-01T08:41:26","modified_gmt":"2018-02-01T00:41:26","slug":"%e5%8f%af%e8%a7%86%e5%8c%96-%e5%af%b9%e6%8e%a5grafana","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=582","title":{"rendered":"\u53ef\u89c6\u5316-\u5bf9\u63a5Grafana"},"content":{"rendered":"<div class=\"help-body-box-detail-title\">\n<p>\u66f4\u65b0\u65f6\u95f4\uff1a2018-01-24 13:13:08<\/p>\n<div class=\"ribbon\"><i class=\"ribbon-btn-icon dbl-icon-base-sina\"><\/i>\u00a0<i class=\"ribbon-btn-icon dbl-icon-base-weixin\"><\/i>\u00a0<i class=\"ribbon-btn-icon dbl-icon-base-wujiaoxing\"><\/i>\u00a0<i class=\"ribbon-btn-icon dbl-icon-base-xiazai\"><\/i><\/div>\n<\/div>\n<div class=\"markdown-body\">\n<p><a href=\"https:\/\/www.aliyun.com\/product\/sls?spm=5176.doc60952.2.4.XoLJSW\" data-spm-anchor-id=\"5176.doc60952.2.4\">\u963f\u91cc\u4e91\u65e5\u5fd7\u670d\u52a1<\/a>\u662f\u9488\u5bf9\u65e5\u5fd7\u7c7b\u6570\u636e\u7684\u4e00\u7ad9\u5f0f\u670d\u52a1\uff0c\u7528\u6237\u53ea\u9700\u8981\u5c06\u7cbe\u529b\u96c6\u4e2d\u5728\u5206\u6790\u4e0a\uff0c\u8fc7\u7a0b\u4e2d\u6570\u636e\u91c7\u96c6\u3001\u5bf9\u63a5\u5404\u79cd\u5b58\u50a8\u8ba1\u7b97\u3001\u6570\u636e\u7d22\u5f15\u548c\u67e5\u8be2\u7b49\u7410\u788e<a href=\"https:\/\/help.aliyun.com\/document_detail\/48869.html?spm=5176.doc60952.2.5.XoLJSW\" data-spm-anchor-id=\"5176.doc60952.2.5\">\u5de5\u4f5c<\/a>\u7b49\u90fd\u53ef\u4ee5\u4ea4\u7ed9\u65e5\u5fd7\u670d\u52a1\u5b8c\u6210\u30022017\u5e749\u6708\u65e5\u5fd7\u670d\u52a1\u5347\u7ea7<a href=\"https:\/\/help.aliyun.com\/document_detail\/43772.html?spm=5176.doc60952.2.6.XoLJSW\" data-spm-anchor-id=\"5176.doc60952.2.6\">\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u529f\u80fd\uff08LogSearch\/Analytics\uff09<\/a>\uff0c\u53ef\u4ee5\u4f7f\u7528\u67e5\u8be2+SQL92\u8bed\u6cd5\u5bf9\u65e5\u5fd7\u8fdb\u884c\u5b9e\u65f6\u5206\u6790\u3002<\/p>\n<p>\u5728\u7ed3\u679c\u5206\u6790\u53ef\u89c6\u5316\u4e0a\uff0c\u9664\u4e86\u4f7f\u7528<a href=\"https:\/\/help.aliyun.com\/document_detail\/59324.html?spm=5176.doc60952.2.7.XoLJSW\" data-spm-anchor-id=\"5176.doc60952.2.7\">\u81ea\u5e26Dashboard<\/a>\u5916\uff0c\u8fd8\u652f\u6301DataV\u3001Grafana\u3001Tableua\u3001QuickBI\u7b49\u5bf9\u63a5\u65b9\u5f0f\u3002\u672c\u6587\u4e3b\u8981\u901a\u8fc7Grafana\u793a\u4f8b\u6f14\u793a\u5982\u4f55\u901a\u8fc7\u65e5\u5fd7\u670d\u52a1\u5bf9Nginx\u65e5\u5fd7\u8fdb\u884c\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u3002<\/p>\n<p>\u5728\u7ebf\u6210\u679c\u6f14\u793a\u8bf7\u67e5\u770b<a href=\"http:\/\/47.96.36.117:3000\/dashboard\/db\/nginxfang-wen-tong-ji?spm=5176.doc60952.2.8.XoLJSW&amp;orgId=1\" data-spm-anchor-id=\"5176.doc60952.2.8\">\u7ebf\u4e0aDemo<\/a>\u3002\u914d\u7f6e\u89c6\u9891\uff1a<\/p>\n<p><video controls=\"controls\" width=\"480\" height=\"320\" data-mce-fragment=\"1\"><\/video><\/p>\n<h2 id=\"h2-u6D41u7A0Bu67B6u67841\"><a class=\"reference-link\" name=\"\u6d41\u7a0b\u67b6\u6784\"><\/a>\u6d41\u7a0b\u67b6\u6784<\/h2>\n<p>\u65e5\u5fd7\u4ece\u6536\u96c6\u5230\u5206\u6790\u7684\u6d41\u7a0b\u67b6\u6784\u5982\u4e0b\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/b6eb440698e3d27dd22a659139497ee2.png\" alt=\"image.png\" \/><\/p>\n<h2 id=\"h2-u914Du7F6Eu6D41u7A0B2\"><a class=\"reference-link\" name=\"\u914d\u7f6e\u6d41\u7a0b\"><\/a>\u914d\u7f6e\u6d41\u7a0b<\/h2>\n<ol>\n<li>\u65e5\u5fd7\u6570\u636e\u91c7\u96c6\u3002\u8be6\u7ec6\u6b65\u9aa4\u8bf7\u53c2\u8003<a href=\"https:\/\/help.aliyun.com\/document_detail\/54604.html?spm=5176.doc60952.2.9.XoLJSW\" data-spm-anchor-id=\"5176.doc60952.2.9\">5\u5206\u949f\u5feb\u901f\u5165\u95e8<\/a>\u3002<\/li>\n<li>\u7d22\u5f15\u8bbe\u7f6e\u4e0e\u63a7\u5236\u53f0\u67e5\u8be2\u914d\u7f6e\u3002\u8be6\u7ec6\u6b65\u9aa4\u8bf7\u53c2\u8003<a href=\"https:\/\/help.aliyun.com\/document_detail\/43772.html?spm=5176.doc60952.2.10.XoLJSW\" data-spm-anchor-id=\"5176.doc60952.2.10\">\u7d22\u5f15\u8bbe\u7f6e\u4e0e\u53ef\u89c6\u5316<\/a>\u6216\u6700\u4f73\u5b9e\u8df5<a href=\"https:\/\/help.aliyun.com\/document_detail\/56728.html?spm=5176.doc60952.2.11.XoLJSW\" data-spm-anchor-id=\"5176.doc60952.2.11\">\u7f51\u7ad9\u65e5\u5fd7\u5206\u6790\u6848\u4f8b<\/a>\u3002<\/li>\n<li>\u5b89\u88c5Grafana\u63d2\u4ef6\uff0c\u5c06\u5b9e\u65f6\u67e5\u8be2SQL\u8f6c\u5316\u4e3a\u89c6\u56fe\u3002<\/li>\n<\/ol>\n<p>\u672c\u6587\u6863\u6f14\u793a\u6b65\u9aa43\u3002<\/p>\n<p>\u5728\u505a\u5b8c1\u30012\u6b65\u9aa4\u540e\uff0c\u5728\u67e5\u8be2\u9875\u9762\u53ef\u4ee5\u770b\u5230\u539f\u59cb\u65e5\u5fd7\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/cad7789fe8d41257f282043d88292262.png\" alt=\"image.png\" \/><\/p>\n<h2 id=\"h2-u914Du7F6Eu6B65u9AA43\"><a class=\"reference-link\" name=\"\u914d\u7f6e\u6b65\u9aa4\"><\/a>\u914d\u7f6e\u6b65\u9aa4<\/h2>\n<h3 id=\"h3--grafana\"><a class=\"reference-link\" name=\"\u5b89\u88c5Grafana\"><\/a>\u5b89\u88c5Grafana<\/h3>\n<p>Grafana\u7684\u8be6\u7ec6\u5b89\u88c5\u6b65\u9aa4\u8bf7\u53c2\u89c1<a href=\"http:\/\/docs.grafana.org\/installation\/?spm=5176.doc60952.2.12.XoLJSW\" data-spm-anchor-id=\"5176.doc60952.2.12\">Grafana\u5b98\u65b9\u6587\u6863<\/a>\u3002<\/p>\n<p>\u4ee5Ubuntu\u4e3a\u4f8b\uff0c\u5b89\u88c5\u547d\u4ee4\u4e3a\uff1a<\/p>\n<ol class=\"linenums\">\n<li class=\"L0\"><code class=\"hljs vim\"><span class=\"pln\">wget http<span class=\"hljs-variable\">s<\/span><\/span><span class=\"pun\"><span class=\"hljs-variable\">:<\/span><\/span><span class=\"com\">\/\/s3-us-west-<span class=\"hljs-number\">2<\/span>.amazonaws.<span class=\"hljs-keyword\">com<\/span>\/grafana-releases\/release\/grafana_4.<span class=\"hljs-number\">5.2<\/span>_amd64.<span class=\"hljs-keyword\">deb<\/span><\/span><\/code><\/li>\n<li class=\"L1\"><code class=\"hljs armasm\"><span class=\"pln\"><span class=\"hljs-symbol\">sudo<\/span> apt<\/span><span class=\"pun\">-<\/span><span class=\"kwd\"><span class=\"hljs-meta\">get<\/span><\/span><span class=\"pln\"> install <\/span><span class=\"pun\">-<\/span><span class=\"pln\">y <span class=\"hljs-keyword\">adduser <\/span>libfontconfig<\/span><\/code><\/li>\n<li class=\"L2\"><code class=\"hljs css\"><span class=\"pln\"><span class=\"hljs-selector-tag\">sudo<\/span> <span class=\"hljs-selector-tag\">dpkg<\/span> <\/span><span class=\"pun\"><span class=\"hljs-selector-tag\">-<\/span><\/span><span class=\"pln\"><span class=\"hljs-selector-tag\">i<\/span> <span class=\"hljs-selector-tag\">grafana_4<\/span><\/span><span class=\"pun\"><span class=\"hljs-selector-class\">.<\/span><\/span><span class=\"lit\"><span class=\"hljs-selector-class\">5<\/span><span class=\"hljs-selector-class\">.2<\/span><\/span><span class=\"pln\"><span class=\"hljs-selector-class\">_amd64<\/span><\/span><span class=\"pun\"><span class=\"hljs-selector-class\">.<\/span><\/span><span class=\"pln\"><span class=\"hljs-selector-class\">deb<\/span><\/span><\/code><\/li>\n<\/ol>\n<p>\u5982\u60a8\u9700\u8981\u4f7f\u7528\u997c\u72b6\u56fe\uff0c\u5219\u9700\u5b89\u88c5Pie chart\u63d2\u4ef6\u3002\u8be6\u7ec6\u6b65\u9aa4\u8bf7\u53c2\u8003<a href=\"https:\/\/grafana.com\/plugins\/grafana-piechart-panel\/installation?spm=5176.doc60952.2.13.XoLJSW\" data-spm-anchor-id=\"5176.doc60952.2.13\">Grafana\u5b98\u65b9\u6587\u6863<\/a>\u3002<\/p>\n<p>\u5b89\u88c5\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n<ol class=\"linenums\">\n<li class=\"L0\"><code class=\"hljs avrasm\"><span class=\"pln\">grafana<\/span><span class=\"pun\">-<\/span><span class=\"pln\"><span class=\"hljs-keyword\">cli<\/span> plugins install grafana<\/span><span class=\"pun\">-<\/span><span class=\"pln\">piechart<\/span><span class=\"pun\">-<\/span><span class=\"pln\">panel<\/span><\/code><\/li>\n<\/ol>\n<h3 id=\"h3-u5B89u88C5u65E5u5FD7u670Du52A1u63D2u4EF6\"><a class=\"reference-link\" name=\"\u5b89\u88c5\u65e5\u5fd7\u670d\u52a1\u63d2\u4ef6\"><\/a>\u5b89\u88c5\u65e5\u5fd7\u670d\u52a1\u63d2\u4ef6<\/h3>\n<p>\u8bf7\u786e\u8ba4Grafana\u7684\u63d2\u4ef6\u76ee\u5f55\u4f4d\u7f6e\u3002 Ubuntu\u7684\u63d2\u4ef6\u5730\u5740\u5728\u00a0<code>\/var\/lib\/grafana\/plugins\/<\/code>\uff0c\u5b89\u88c5\u597d\u63d2\u4ef6\u540e\u91cd\u542fgrafana-server\u3002<\/p>\n<p>\u4ee5Ubuntu\u7cfb\u7edf\u4e3a\u4f8b\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u63d2\u4ef6\uff0c\u5e76\u91cd\u542fgrafana-server\u3002<\/p>\n<ol class=\"linenums\">\n<li class=\"L0\"><code class=\"hljs crystal\"><span class=\"pln\">cd <\/span><span class=\"pun\">\/<\/span><span class=\"kwd\">var<\/span><span class=\"pun\">\/<\/span><span class=\"pln\"><span class=\"hljs-class\"><span class=\"hljs-keyword\">lib<\/span><\/span><\/span><span class=\"pun\"><span class=\"hljs-class\">\/<\/span><\/span><span class=\"pln\"><span class=\"hljs-class\"><span class=\"hljs-title\">grafana<\/span><\/span><\/span><span class=\"pun\"><span class=\"hljs-class\">\/<\/span><\/span><span class=\"pln\"><span class=\"hljs-class\"><span class=\"hljs-title\">plugins<\/span><\/span><\/span><span class=\"pun\"><span class=\"hljs-class\">\/<\/span><\/span><\/code><\/li>\n<li class=\"L1\"><code class=\"hljs crmsh\"><span class=\"pln\">git <span class=\"hljs-keyword\">clone<\/span> <span class=\"hljs-title\">https<\/span><\/span><span class=\"pun\">:<\/span><span class=\"com\">\/\/github.com\/aliyun\/aliyun-log-grafana-datasource-plugin<\/span><\/code><\/li>\n<li class=\"L2\"><code class=\"hljs axapta\"><span class=\"pln\">service grafana<\/span><span class=\"pun\">-<\/span><span class=\"pln\"><span class=\"hljs-keyword\">server<\/span> restart<\/span><\/code><\/li>\n<\/ol>\n<h3 id=\"h3-u914Du7F6Eu65E5u5FD7u6570u636Eu6E90\"><a class=\"reference-link\" name=\"\u914d\u7f6e\u65e5\u5fd7\u6570\u636e\u6e90\"><\/a>\u914d\u7f6e\u65e5\u5fd7\u6570\u636e\u6e90<\/h3>\n<p>\u5982\u60a8\u662f\u5728\u672c\u673a\u90e8\u7f72\uff0c\u9ed8\u8ba4\u662f\u5b89\u88c5\u57283000\u7aef\u53e3\u3002<\/p>\n<p>\u5728\u6d4f\u89c8\u5668\u6253\u5f003000\u7aef\u53e3\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/032f57e3024b1d256978fc30258d0652.png\" alt=\"image.png\" \/><\/p>\n<ol>\n<li>\u5728\u5de6\u4e0a\u89d2\u5355\u51fbGrafana\u7684logo\uff0c\u5728\u5f39\u51fa\u7a97\u53e3\u4e0a\u9009\u62e9Data Sources\u3002\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/89e524d40e03bd18a7afc2178436170c.png\" alt=\"image.png\" \/><\/li>\n<li>\u5355\u51fb\u6dfb\u52a0\u65b0\u7684DataSource \u4f7f\u7528Grafana\u548c\u963f\u91cc\u4e91\u65e5\u5fd7\u670d\u52a1\u8fdb\u884c\u65e5\u5fd7\u53ef\u89c6\u5316\u5206\u6790\u3002\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/b25ab712c756642b5566448dead73fd7.png\" alt=\"image.png\" \/><\/p>\n<p>\u5404\u90e8\u5206\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>datasource<\/td>\n<td>\u540d\u79f0\u53ef\u4ee5\u81ea\u5b9a\u4e49\uff0c\u7c7b\u578b\u9009\u62e9<strong>LogService<\/strong>\u3002<\/td>\n<\/tr>\n<tr>\n<td>Http Setting<\/td>\n<td>url\u8f93\u5165\u6837\u4f8b\uff1a<code>http:\/\/dashboard-demo.cn-hangzhou.log.aliyuncs.com \u3002dashboard-demo\u662fproject\u540d\u79f0\uff0ccn-hangzhou.log.aliyuncs.com<\/code>\u662fproject\u6240\u5728\u5730\u57df\u7684endpoint\uff0c\u5728\u914d\u7f6e\u81ea\u5df1\u7684\u6570\u636e\u6e90\u65f6\uff0c\u9700\u8981\u7279\u522b\u7684\u66ff\u6362\u6210\u81ea\u5df1\u7684project\u548cregion\u5730\u5740\u3002Access\u53ef\u4ee5\u9009\u62e9Direct\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9Proxy\u3002<\/td>\n<\/tr>\n<tr>\n<td>Http Auth<\/td>\n<td>\u91c7\u7528\u9ed8\u8ba4\u914d\u7f6e\u3002<\/td>\n<\/tr>\n<tr>\n<td>log service details<\/td>\n<td>\u65e5\u5fd7\u670d\u52a1\u8be6\u7ec6\u914d\u7f6e\uff0c\u5206\u522b\u586b\u5199Project\u548cLogstore\uff0c\u4ee5\u53ca\u5177\u5907\u8bfb\u53d6\u6743\u9650\u7684AccessKey\u3002AccessKey\u53ef\u4ee5\u662f\u4e3b\u8d26\u53f7\u7684AccessKey\uff0c\u4e5f\u53ef\u4ee5\u662f\u5b50\u5e10\u53f7\u7684AccessKey\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ol>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\u5355\u51fbAdd\uff0c\u5373\u53ef\u5b8c\u6210\u6dfb\u52a0DataSource\u3002\u63a5\u4e0b\u6765\u6dfb\u52a0Dashboard\u3002<\/p>\n<h3 id=\"h3--dashboard\"><a class=\"reference-link\" name=\"\u6dfb\u52a0Dashboard\"><\/a>\u6dfb\u52a0Dashboard<\/h3>\n<p>\u5355\u51fb\u6253\u5f00\u5de6\u4e0a\u89d2\u83dc\u5355\uff0c\u9009\u62e9<strong>Dashboards<\/strong>\u5e76\u5355\u51fb<strong>New<\/strong>\u3002\u5728\u5de6\u4e0a\u89d2\u83dc\u5355\u4e2d\u65b0\u52a0\u4e00\u4e2aDashboard\u3002<\/p>\n<h4 id=\"h4-u914Du7F6Eu6A21u677Fu53D8u91CF\"><a class=\"reference-link\" name=\"\u914d\u7f6e\u6a21\u677f\u53d8\u91cf\"><\/a>\u914d\u7f6e\u6a21\u677f\u53d8\u91cf<\/h4>\n<p>\u5728Grafana\u4e2d\u53ef\u4ee5\u914d\u7f6e\u6a21\u677f\u53d8\u91cf\uff0c\u5728\u540c\u4e00\u4e2a\u89c6\u56fe\u4e2d\uff0c\u901a\u8fc7\u9009\u62e9\u4e0d\u540c\u7684\u53d8\u91cf\u503c\uff0c\u5c55\u793a\u4e0d\u540c\u7684\u89c6\u56fe\u3002\u672c\u6587\u6863\u4e3b\u8981\u914d\u7f6e\u6bcf\u4e2a\u65f6\u95f4\u533a\u95f4\u7684\u5927\u5c0f\uff0c\u4ee5\u53ca\u4e0d\u540c\u57df\u540d\u7684\u8bbf\u95ee\u60c5\u51b5\u3002<\/p>\n<ol>\n<li>\u5355\u51fb\u9875\u9762\u4e0a\u65b9\u8bbe\u7f6e\u56fe\u6807\uff0c\u7136\u540e\u5355\u51fb<strong>Templating<\/strong>\u3002<\/li>\n<li>\u5728\u5f53\u524d\u9875\u9762\u663e\u793a\u51fa\u5df2\u7ecf\u914d\u7f6e\u7684\u6a21\u677f\u53d8\u91cf\uff0c\u5355\u51fb<strong>New<\/strong>\uff0c \u521b\u5efa\u65b0\u7684\u6a21\u677f\u3002\n<p>\u9996\u5148\u914d\u7f6e\u4e00\u4e2a\u65f6\u95f4\u533a\u95f4\uff0c\u53d8\u91cf\u7684\u540d\u79f0\u662f\u60a8\u5728\u914d\u7f6e\u4e2d\u4f7f\u7528\u7684\u53d8\u91cf\uff0c\u5728\u8fd9\u91cc\u8d77\u540d\u4e3amyinterval\uff0c \u5728\u67e5\u8be2\u6761\u4ef6\u4e2d\uff0c\u8981\u5199\u6210<code>$myinterval<\/code>\u00a0\uff0c\u4f1a\u81ea\u52a8\u66ff\u6362\u6210\u9875\u9762\u9009\u62e9\u7684\u6a21\u677f\u503c\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/9e414c01b9c20edc51c127b9064c720d.png\" alt=\"image.png\" \/><\/li>\n<li>\u914d\u7f6e\u4e00\u4e2a\u57df\u540d\u6a21\u677f\u3002\u901a\u5e38\u4e00\u4e2avps\u4e0a\u53ef\u4ee5\u6302\u8f7d\u591a\u4e2a\u57df\u540d\uff0c\u90a3\u4e48\u9700\u8981\u67e5\u770b\u4e0d\u540c\u57df\u540d\u7684\u8bbf\u95ee\u60c5\u51b5\u3002\u5728\u6a21\u677f\u503c\u4e2d\uff0c\u8f93\u5165<code>*,www.host.com,www.host0.com,www.host1.com<\/code>\uff0c \u8868\u793a\u53ef\u4ee5\u67e5\u770b\u6240\u6709\u57df\u540d\uff0c\u4e5f\u53ef\u4ee5\u5206\u522b\u67e5\u770b<code>www.host.com<\/code>\u3001<code>www.host0.com<\/code>\u6216\u8005<code>www.host1.com<\/code>\u7684\u8bbf\u95ee\u60c5\u51b5\u3002\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/2e484f11cbb633b79367edf0a70932fd.png\" alt=\"image.png\" \/><\/p>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728dashboard\u9875\u9762\u4e0a\u65b9\u770b\u5230\u521a\u624d\u914d\u7f6e\u7684\u6a21\u677f\u53d8\u91cf\uff0c\u901a\u8fc7\u4e0b\u62c9\u6846\u53ef\u4ee5\u9009\u62e9\u4efb\u4f55\u4e00\u4e2a\u503c\u3002\u4f8b\u5982time interval\uff0c\u6240\u6709\u53ef\u9009\u7684\u503c\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/9ac2e965d2d5518cba37c973ae8c5923.png\" alt=\"image.png\" \/><\/li>\n<\/ol>\n<h4 id=\"h4--pv-uv\"><a class=\"reference-link\" name=\"\u914d\u7f6ePV\uff0cUV\"><\/a>\u914d\u7f6ePV\uff0cUV<\/h4>\n<ol>\n<li>\u5355\u51fb\u5de6\u4fa7ADD ROW\uff0c\u65b0\u5efa\u4e00\u884c\u56fe\u8868\u3002\u5982\u679c\u5df2\u7ecf\u6709\u4e00\u884crow\u4e86\uff0c\u53ef\u4ee5\u5728\u5de6\u4fa7\u7684\u5f39\u51fa\u5f0f\u83dc\u5355\u91cc\u9009\u62e9Add Panel\uff1a\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/43f9142e4ce54f2814318ff847d9d5d4.png\" alt=\"image.png\" \/><\/li>\n<li>Grafana\u53ef\u4ee5\u652f\u6301\u591a\u91cd\u7c7b\u578b\u7684\u89c6\u56fe\u3002\u5bf9\u4e8ePV\uff0cUV\u6570\u636e\uff0c\u521b\u5efa\u4e00\u4e2aGraph\u89c6\u56fe\u3002\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/700061a60064d4ad08dda6e413db4028.png\" alt=\"image.png\" \/><\/li>\n<li>\u5355\u51fbPannel Title\uff0c\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u4e2d\u5355\u51fbEdit\u3002\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/c77b38181ed88e92cbe01ba831a57919.png\" alt=\"image.png\" \/><\/li>\n<li>\u5728Metrics\u914d\u7f6e\u4e2d\uff0c\u9009\u62e9datasource\u4e3a<code>logservice<\/code>\uff0c\u8f93\u5165Query\uff0cY\u8f74\u548cX\u8f74\uff1a\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/12684360ed86885cce0817c9841b80c7.png\" alt=\"image.png\" \/><\/li>\n<li>dataSource\u4e0b\u62c9\u6846\u4e2d\u9009\u62e9\u4e4b\u524d\u914d\u7f6e\u7684:<code>logService<\/code>\u3002<br \/>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname| select approx_distinct(remote_addr) as uv ,count(1) as pv , __time__ - __time__ % $$myinterval as time group by time order by time limit 1000<\/code>\u4e0a\u8ff0Query\u4e2d\u7684$hostname\uff0c\u5728\u5b9e\u9645\u5c55\u793a\u65f6\uff0c\u4f1a\u66ff\u6362\u6210\u7528\u6237\u9009\u62e9\u7684\u57df\u540d\u3002$$myinterval\uff0c\u5219\u4f1a\u66ff\u6362\u6210\u65f6\u95f4\u533a\u95f4\uff0c\u6ce8\u610fmyinterval\u524d\u6709\u4e24\u4e2a$\u7b26\u53f7\uff0c\u800chostname\u6709\u4e00\u4e2a\u3002<\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>time<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>uv,pv<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>UV\u548cPV\u7684\u503c\u76f8\u5dee\u6bd4\u8f83\u5927\uff0c\u9700\u8981\u7528\u4e24\u4e2aY\u8f74\u6765\u5c55\u793a\uff0c\u5728\u56fe\u6807\u4e0b\u65b9\uff0c\u5355\u51fbuv\u5de6\u4fa7\u6709\u989c\u8272\u7684\u7ebf\uff0c\u53ef\u4ee5\u9009\u62e9uv\u662f\u5728\u5de6Y\u8f74\u663e\u793a\uff0c\u8fd8\u662f\u5728\u53f3Y\u8f74\u663e\u793a\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/cc43e817c2b6135e626dd5cbc2e178b5.png\" alt=\"image.png\" \/><\/p>\n<p>\u6807\u9898\u9700\u8981\u89c6\u56fe\uff0c\u9ed8\u8ba4\u662fPanel Title\uff0c\u5355\u51fbGeneral\u3002\u53ef\u4ee5\u4fee\u6539Title\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/3ebc6686ecf80970abf9fc650e19b12d.png\" alt=\"image.png\" \/><\/li>\n<\/ol>\n<h4 id=\"h4-u914Du7F6Eu51FAu5165u7F51u5E26u5BBD\"><a class=\"reference-link\" name=\"\u914d\u7f6e\u51fa\u5165\u7f51\u5e26\u5bbd\"><\/a>\u914d\u7f6e\u51fa\u5165\u7f51\u5e26\u5bbd<\/h4>\n<p>\u60a8\u53ef\u4ee5\u540c\u6837\u7684\u65b9\u6cd5\u6dfb\u52a0\u51fa\u5165\u7f51\u5e26\u5bbd\u7684\u6d41\u91cf\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/45388a18838571c24fb2f5d2eba6e806.png\" alt=\"image.png\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname | select sum(body_byte_sent) as net_out, sum(request_length) as net_in ,__time__ - __time__ % $$myinterval as time group by __time__ - __time__ % $$myinterval limit 10000<\/code><\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>Time<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>net_in,net_out<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"h4--http-\"><a class=\"reference-link\" name=\"\u4e0d\u540cHTTP\u65b9\u6cd5\u7684\u5360\u6bd4\"><\/a>\u4e0d\u540cHTTP\u65b9\u6cd5\u7684\u5360\u6bd4<\/h4>\n<p>\u65b0\u5efa\u4e00\u4e2aRow\uff0c\u89c6\u56fe\u9009\u62e9<code>Pie Chart<\/code>\uff0c\u5e76\u5728\u914d\u7f6e\u4e2d\u8f93\u5165Query\uff0c\u548cx\uff0cy\u8f74\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/49e9c2f2b196740fe2cf5c1b0020665a.png\" alt=\"image.png\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname | select count(1) as pv ,method group by method<\/code><\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>pie<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>method,pv<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"h4--http-\"><a class=\"reference-link\" name=\"\u4e0d\u540cHTTP\u72b6\u6001\u7801\u5360\u6bd4\"><\/a>\u4e0d\u540cHTTP\u72b6\u6001\u7801\u5360\u6bd4<\/h4>\n<p>\u65b0\u5efa\u4e00\u4e2aRow\uff0c\u89c6\u56fe\u9009\u62e9<code>Pie Chart<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/9d7ad76d0b50d84aa8e6964ea449d889.png\" alt=\"image.png\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname | select count(1) as pv ,status group by status<\/code><\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>pie<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>status,pv<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"h4-u70EDu95E8u6765u6E90u9875u9762\"><a class=\"reference-link\" name=\"\u70ed\u95e8\u6765\u6e90\u9875\u9762\"><\/a>\u70ed\u95e8\u6765\u6e90\u9875\u9762<\/h4>\n<p>\u65b0\u5efa\u4e00\u4e2aRow\uff0c\u89c6\u56fe\u9009\u62e9<code>Pie Chart<\/code>:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/ce9700b80dccdd845055a6effc428f97.png\" alt=\"image.png\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname | select count(1) as pv , referer group by referer order by pv desc<\/code><\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>pie<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>referer,pv<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"h4-u5EF6u65F6u6700u9AD8u9875u9762\"><a class=\"reference-link\" name=\"\u5ef6\u65f6\u6700\u9ad8\u9875\u9762\"><\/a>\u5ef6\u65f6\u6700\u9ad8\u9875\u9762<\/h4>\n<p>\u4e3a\u4e86\u4ee5\u8868\u683c\u5f62\u5f0f\u5c55\u793aUrl\u548c\u5bf9\u5e94\u7684\u5ef6\u65f6\uff0c\u8bf7\u5728\u521b\u5efa\u65f6\uff0c\u6307\u5b9a<code>Table<\/code>\u8fd9\u79cd\u89c6\u56fe\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/84d6fc7f19ae75f410db8c99b2fc5e8c.png\" alt=\"image.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/fe2cc1fdc51ef646a9da7923051e6b36.png\" alt=\"image.png\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname | select url as top_latency_url ,request_time order by request_time desc limit 10<\/code><\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>X-Column\u4e0d\u586b\u5199\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>top_latency_url,request_time<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"h4-u70EDu95E8u9875u9762\"><a class=\"reference-link\" name=\"\u70ed\u95e8\u9875\u9762\"><\/a>\u70ed\u95e8\u9875\u9762<\/h4>\n<p>\u65b0\u5efa\u4e00\u4e2a\u8868\u683c\u89c6\u56fe\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/c90c0ae437ccba147d7a5e15aa7b0f2d.png\" alt=\"image.png\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname | select count(1) as pv, split_part(url,'?',1) as path group by split_part(url,'?',1) order by pv desc limit 20<\/code><\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>X-Column\u4e0d\u586b\u5199\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>path,pv<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"h4--200-top-\"><a class=\"reference-link\" name=\"\u975e200\u8bf7\u6c42top\u9875\u9762\"><\/a>\u975e200\u8bf7\u6c42top\u9875\u9762<\/h4>\n<p>\u65b0\u5efa\u4e00\u4e2a\u8868\u683c\u89c6\u56fe\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/d28129aad4af0f3169de12c453359a22.png\" alt=\"image.png\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname not status:200| select count(1) as pv , url group by url order by pv desc<\/code><\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>X-Column\u4e0d\u586b\u5199\u5185\u5bb9<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>url,pv<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"h4-u524Du540Eu7AEFu5E73u5747u5EF6u65F6\"><a class=\"reference-link\" name=\"\u524d\u540e\u7aef\u5e73\u5747\u5ef6\u65f6\"><\/a>\u524d\u540e\u7aef\u5e73\u5747\u5ef6\u65f6<\/h4>\n<p>\u65b0\u5efa\u4e00\u4e2aGraph\u89c6\u56fe\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/b6f95e90691d6bd68f8cc366dbb6e227.png\" alt=\"image.png\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname | select avg(request_time) as response_time, avg(upstream_response_time) as upstream_response_time ,__time__ - __time__ % $$myinterval as time group by __time__ - __time__ % $$myinterval limit 10000<\/code><\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>time<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>upstream_response_time,response_time<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"h4-u5BA2u6237u7AEFu7EDFu8BA1\"><a class=\"reference-link\" name=\"\u5ba2\u6237\u7aef\u7edf\u8ba1\"><\/a>\u5ba2\u6237\u7aef\u7edf\u8ba1<\/h4>\n<p>\u65b0\u5efa\u4e00\u4e2a\u997c\u56fe\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/c9d926e90be08ab3aa26367e6192908b.png\" alt=\"image.png\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20%\">\u914d\u7f6e\u9879<\/th>\n<th width=\"25%\">\u914d\u7f6e\u5185\u5bb9<\/th>\n<\/tr>\n<tr>\n<td>Query<\/td>\n<td><code>$hostname | select count(1) as pv, case when http_user_agent like '%Android%' then 'Android' when http_user_agent like '%iPhone%' then 'iOS' else 'unKnown' end as http_user_agent group by case when http_user_agent like '%Android%' then 'Android' when http_user_agent like '%iPhone%' then 'iOS' else 'unKnown' end order by pv desc limit 10<\/code><\/td>\n<\/tr>\n<tr>\n<td>X-Column<\/td>\n<td>pie<\/td>\n<\/tr>\n<tr>\n<td>Y-Column<\/td>\n<td>http_user_agent,pv<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"h4--dashboard\"><a class=\"reference-link\" name=\"\u4fdd\u5b58\u548c\u53d1\u5e03dashboard\"><\/a>\u4fdd\u5b58\u548c\u53d1\u5e03dashboard<\/h4>\n<p>\u5355\u51fb\u9875\u9762\u4e0a\u65b9\u7684\u4fdd\u5b58\u6309\u94ae\uff0c\u53d1\u5e03Dashboard\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/0eb1a824d3368172c25de9c1307a8d58.png\" alt=\"image.png\" \/><\/p>\n<h3 id=\"h3-u67E5u770Bu6548u679C\"><a class=\"reference-link\" name=\"\u67e5\u770b\u6548\u679c\"><\/a>\u67e5\u770b\u6548\u679c<\/h3>\n<p>\u6253\u5f00Dashboard\u9996\u9875\u67e5\u770b\u6548\u679c\u3002<a href=\"http:\/\/47.96.36.117:3000\/dashboard\/db\/nginxfang-wen-tong-ji?spm=5176.doc60952.2.14.XoLJSW&amp;orgId=1\" data-spm-anchor-id=\"5176.doc60952.2.14\">Demo\u5730\u5740<\/a>\u3002<\/p>\n<p>\u5728\u9875\u9762\u4e0a\u65b9\uff0c\u53ef\u4ee5\u9009\u62e9\u7edf\u8ba1\u7684\u65f6\u95f4\u8303\u56f4\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9\u7edf\u8ba1\u7684\u65f6\u95f4\u7c92\u5ea6\uff0c\u6216\u8005\u9009\u62e9\u4e0d\u540c\u7684\u57df\u540d\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/47d3c04d68a3bf8e2d2fc0aa2ff725bf.png\" alt=\"image.png\" \/><\/p>\n<p>\u8fd9\u6837\u6574\u4e2aNginx\u8bbf\u95ee\u7edf\u8ba1\u7684Dashboard\u5c31\u5b8c\u6210\u4e86\uff0c\u60a8\u53ef\u4ee5\u4ece\u89c6\u56fe\u4e2d\u6316\u6398\u6709\u4ef7\u503c\u7684\u4fe1\u606f\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/ata2-img.cn-hangzhou.img-pub.aliyun-inc.com\/bb1cddffeaa61b9f73cd92026a3fb08b.png\" alt=\"image.png\" \/><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u66f4\u65b0\u65f6\u95f4\uff1a2018-01-24 13:13:08 \u00a0\u00a0\u00a0 \u963f\u91cc\u4e91\u65e5\u5fd7\u670d\u52a1\u662f\u9488\u5bf9\u65e5\u5fd7\u7c7b\u6570\u636e\u7684\u4e00\u7ad9\u5f0f\u670d\u52a1\uff0c\u7528\u6237\u53ea\u9700\u8981\u5c06\u7cbe\u529b\u96c6\u4e2d\u5728\u5206\u6790\u4e0a\uff0c\u8fc7\u7a0b\u4e2d\u6570\u636e\u91c7\u96c6\u3001\u5bf9\u63a5\u5404\u79cd\u5b58\u50a8\u8ba1\u7b97\u3001\u6570\u636e\u7d22\u5f15\u548c\u67e5\u8be2\u7b49\u7410\u788e\u5de5\u4f5c\u7b49\u90fd\u53ef\u4ee5\u4ea4\u7ed9\u65e5\u5fd7\u670d\u52a1\u5b8c\u6210\u30022017\u5e749\u6708\u65e5\u5fd7\u670d\u52a1\u5347\u7ea7\u65e5\u5fd7\u5b9e\u65f6\u5206\u6790\u529f\u80fd\uff08LogSearch\/Analytics\uff09\uff0c\u53ef\u4ee5\u4f7f\u7528\u67e5\u8be2+SQL92\u8bed\u6cd5\u5bf9\u65e5\u5fd7\u8fdb\u884c\u5b9e\u65f6\u5206\u6790\u3002 \u5728\u7ed3\u679c\u5206\u6790\u53ef\u89c6\u5316\u4e0a\uff0c\u9664\u4e86\u4f7f\u7528\u81ea\u5e26Dashboard\u5916\uff0c\u8fd8\u652f\u6301DataV\u3001Grafana\u3001Tableua\u3001QuickBI\u7b49\u5bf9\u63a5\u65b9\u5f0f\u3002\u672c\u6587\u4e3b\u8981\u901a\u8fc7Grafana\u793a\u4f8b\u6f14\u793a\u5982\u4f55\u901a\u8fc7\u65e5\u5fd7\u670d\u52a1\u5bf9Nginx\u65e5\u5fd7\u8fdb\u884c\u5206\u6790\u4e0e\u53ef\u89c6\u5316\u3002 \u5728\u7ebf\u6210\u679c\u6f14\u793a\u8bf7\u67e5\u770b\u7ebf\u4e0aDemo\u3002\u914d\u7f6e\u89c6\u9891\uff1a \u6d41\u7a0b\u67b6\u6784 \u65e5\u5fd7\u4ece\u6536\u96c6\u5230\u5206\u6790\u7684\u6d41\u7a0b\u67b6\u6784\u5982\u4e0b\u3002 \u914d\u7f6e\u6d41\u7a0b \u65e5\u5fd7\u6570\u636e\u91c7\u96c6\u3002\u8be6\u7ec6\u6b65\u9aa4\u8bf7\u53c2\u80035\u5206\u949f\u5feb\u901f\u5165\u95e8\u3002 \u7d22\u5f15\u8bbe\u7f6e\u4e0e\u63a7\u5236\u53f0\u67e5\u8be2\u914d\u7f6e\u3002\u8be6\u7ec6\u6b65\u9aa4\u8bf7\u53c2\u8003\u7d22\u5f15\u8bbe\u7f6e\u4e0e\u53ef\u89c6\u5316\u6216\u6700\u4f73\u5b9e\u8df5\u7f51\u7ad9\u65e5\u5fd7\u5206\u6790\u6848\u4f8b\u3002 \u5b89\u88c5Grafana\u63d2\u4ef6\uff0c\u5c06\u5b9e\u65f6\u67e5\u8be2SQL\u8f6c\u5316\u4e3a\u89c6\u56fe\u3002 \u672c\u6587\u6863\u6f14\u793a\u6b65\u9aa43\u3002 \u5728\u505a\u5b8c1\u30012\u6b65\u9aa4\u540e\uff0c\u5728\u67e5\u8be2\u9875\u9762\u53ef\u4ee5\u770b\u5230\u539f\u59cb\u65e5\u5fd7\u3002 \u914d\u7f6e\u6b65\u9aa4 \u5b89\u88c5Grafana Grafana\u7684\u8be6\u7ec6\u5b89\u88c5\u6b65\u9aa4\u8bf7\u53c2\u89c1Grafana\u5b98\u65b9\u6587\u6863\u3002 \u4ee5Ubuntu\u4e3a\u4f8b\uff0c\u5b89\u88c5\u547d\u4ee4\u4e3a\uff1a wget https:\/\/s3-us-west-2.amazonaws.com\/grafana-releases\/release\/grafana_4.5.2_amd64.deb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-582","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=582"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/582\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}