{"id":1546,"date":"2023-03-25T15:31:44","date_gmt":"2023-03-25T07:31:44","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1546"},"modified":"2023-04-27T21:39:20","modified_gmt":"2023-04-27T13:39:20","slug":"installation-and-use-of-visual-monitoring-tool-grafana","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/installation-and-use-of-visual-monitoring-tool-grafana\/","title":{"rendered":"\u53ef\u89c6\u5316\u76d1\u63a7\u5de5\u5177Grafana\u5b89\u88c5\u53ca\u4f7f\u7528"},"content":{"rendered":"<p>\u968f\u7740\u4e1a\u52a1\u7684\u8d8a\u53d1\u590d\u6742\uff0c\u5bf9\u8f6f\u4ef6\u7cfb\u7edf\u7684\u8981\u6c42\u8d8a\u6765\u8d8a\u9ad8\uff0c\u8fd9\u610f\u5473\u7740\u6211\u4eec\u9700\u8981\u968f\u65f6\u638c\u63a7\u7cfb\u7edf\u7684\u8fd0\u884c\u60c5\u51b5\u3002\u56e0\u6b64\uff0c\u5bf9\u7cfb\u7edf\u7684\u5b9e\u65f6\u76d1\u63a7\u4ee5\u53ca\u53ef\u89c6\u5316\u5c55\u793a\uff0c\u5c31\u6210\u4e86\u57fa\u7840\u67b6\u6784\u7684\u5fc5\u987b\u80fd\u529b\u3002<\/p>\n<p>\u672c\u6587\u4ecb\u7ecd\u5f00\u6e90\u53ef\u89c6\u5316\u76d1\u63a7\u5957\u4ef6Grafana\u7684\u5b89\u88c5\u53ca\u5176\u529f\u80fd\u7279\u70b9\u3002<\/p>\n<p>\u5b98\u7f51\u5730\u5740\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/grafana.com\/\">https:\/\/grafana.com\/<\/a><br \/>\n\u5b98\u65b9\u6587\u6863\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/grafana.com\/grafana\">https:\/\/grafana.com\/grafana<\/a><\/p>\n<p><!-- more --><\/p>\n<h2>Grafana\u4ecb\u7ecd<\/h2>\n<p>Grafana\u662f\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684\u5f00\u6e90\u7684\u5ea6\u91cf\u5206\u6790\u548c\u53ef\u89c6\u5316\u5de5\u5177\uff0c\u53ef\u4ee5\u901a\u8fc7\u5c06\u91c7\u96c6\u7684\u6570\u636e\u67e5\u8be2\u7136\u540e\u53ef\u89c6\u5316\u7684\u5c55\u793a\uff0c\u5e76\u53ca\u65f6\u901a\u77e5\u3002\u5b83\u4e3b\u8981\u6709\u4ee5\u4e0b\u516d\u5927\u7279\u70b9\uff1a<\/p>\n<ul>\n<li>\u5c55\u793a\u65b9\u5f0f\uff1a\u5feb\u901f\u7075\u6d3b\u7684\u5ba2\u6237\u7aef\u56fe\u8868\uff0c\u9762\u677f\u63d2\u4ef6\u6709\u8bb8\u591a\u4e0d\u540c\u65b9\u5f0f\u7684\u53ef\u89c6\u5316\u6307\u6807\u548c\u65e5\u5fd7\uff0c\u5b98\u65b9\u5e93\u4e2d\u5177\u6709\u4e30\u5bcc\u7684\u4eea\u8868\u76d8\u63d2\u4ef6\uff0c\u6bd4\u5982\u70ed\u56fe\u3001\u6298\u7ebf\u56fe\u3001\u56fe\u8868\u7b49\u591a\u79cd\u5c55\u793a\u65b9\u5f0f\uff1b<\/li>\n<li>\u6570\u636e\u6e90\uff1aGraphite\uff0cInfluxDB\uff0cOpenTSDB\uff0cPrometheus\uff0cElasticsearch\uff0cCloudWatch\u548cKairosDB\u7b49\uff1b<\/li>\n<li>\u901a\u77e5\u63d0\u9192\uff1a\u4ee5\u53ef\u89c6\u65b9\u5f0f\u5b9a\u4e49\u6700\u91cd\u8981\u6307\u6807\u7684\u8b66\u62a5\u89c4\u5219\uff0cGrafana\u5c06\u4e0d\u65ad\u8ba1\u7b97\u5e76\u53d1\u9001\u901a\u77e5\uff0c\u5728\u6570\u636e\u8fbe\u5230\u9608\u503c\u65f6\u901a\u8fc7Slack\u3001PagerDuty\u7b49\u83b7\u5f97\u901a\u77e5\uff1b<\/li>\n<li>\u6df7\u5408\u5c55\u793a\uff1a\u5728\u540c\u4e00\u56fe\u8868\u4e2d\u6df7\u5408\u4f7f\u7528\u4e0d\u540c\u7684\u6570\u636e\u6e90\uff0c\u53ef\u4ee5\u57fa\u4e8e\u6bcf\u4e2a\u67e5\u8be2\u6307\u5b9a\u6570\u636e\u6e90\uff0c\u751a\u81f3\u81ea\u5b9a\u4e49\u6570\u636e\u6e90\uff1b<\/li>\n<li>\u6ce8\u91ca\uff1a\u4f7f\u7528\u6765\u81ea\u4e0d\u540c\u6570\u636e\u6e90\u7684\u4e30\u5bcc\u4e8b\u4ef6\u6ce8\u91ca\u56fe\u8868\uff0c\u5c06\u9f20\u6807\u60ac\u505c\u5728\u4e8b\u4ef6\u4e0a\u4f1a\u663e\u793a\u5b8c\u6574\u7684\u4e8b\u4ef6\u5143\u6570\u636e\u548c\u6807\u8bb0\uff1b<\/li>\n<li>\u8fc7\u6ee4\u5668\uff1aAd-hoc\u8fc7\u6ee4\u5668\u5141\u8bb8\u52a8\u6001\u521b\u5efa\u65b0\u7684\u952e\/\u503c\u8fc7\u6ee4\u5668\uff0c\u8fd9\u4e9b\u8fc7\u6ee4\u5668\u4f1a\u81ea\u52a8\u5e94\u7528\u4e8e\u4f7f\u7528\u8be5\u6570\u636e\u6e90\u7684\u6240\u6709\u67e5\u8be2\u3002<\/li>\n<\/ul>\n<h2>Grafana\u5b89\u88c5<\/h2>\n<h3>\u4e0b\u8f7d<\/h3>\n<p>\u5b98\u7f51\u4e0b\u8f7d\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/grafana.com\/grafana\/download\">https:\/\/grafana.com\/grafana\/download<\/a><br \/>\n\u5b89\u88c5\u6307\u5357\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/docs.grafana.org\/installation\/rpm\/\">http:\/\/docs.grafana.org\/installation\/rpm\/<\/a><\/p>\n<pre><code>wget https:\/\/dl.grafana.com\/oss\/release\/grafana-6.2.5-1.x86_64.rpm \nsudo yum localinstall grafana-6.2.5-1.x86_64.rpm<\/code><\/pre>\n<h3>\u542f\u52a8<\/h3>\n<p>\u4e0b\u8f7d\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8f93\u5165\u547d\u4ee4<code>systemctl start grafana-server<\/code>\u542f\u52a8\u670d\u52a1\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8f93\u5165IP+\u7aef\u53e3\uff0c3000\u4e3aGrafana\u7684\u9ed8\u8ba4\u4fa6\u542c\u7aef\u53e3\u3002<\/p>\n<p>\u7cfb\u7edf\u9ed8\u8ba4\u7528\u6237\u540d\u548c\u5bc6\u7801\u4e3a<code>admin\/admin<\/code>\uff0c\u7b2c\u4e00\u6b21\u767b\u9646\u7cfb\u7edf\u4f1a\u8981\u6c42\u4fee\u6539\u5bc6\u7801\uff0c\u4fee\u6539\u5bc6\u7801\u540e\u767b\u9646\uff0c\u754c\u9762\u663e\u793a\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.yezhou.me\/AppBlog\/images\/\u8fd0\u7ef4\/Grafana%20Home%20Dashboard.png\" alt=\"Grafana Home Dashboard\" \/><\/p>\n<h2>Grafana\u4f7f\u7528<\/h2>\n<h3>\u6dfb\u52a0\u6570\u636e\u6e90<\/h3>\n<p>\u9996\u5148\u662f\u6dfb\u52a0\u6570\u636e\u6e90\uff0c\u9009\u62e9MySQL\u4f5c\u4e3a\u6570\u636e\u6e90\uff0c\u9700\u8981\u5728MySQL\u4e2d\u521b\u5efa\u8be5\u7528\u6237\u4ee5\u53ca\u5bf9\u5e94\u7684\u6570\u636e\u5e93\uff01<\/p>\n<h3>\u521b\u5efaDashBoard<\/h3>\n<p>\u521b\u5efa\u597d\u6570\u636e\u6e90\u4e4b\u540e\uff0c\u9700\u8981\u521b\u5efaDashBoard\uff08\u4eea\u8868\u76d8\uff09\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49\uff0c\u4e5f\u53ef\u4ee5\u5bfc\u5165\u9700\u8981\u7684\u4eea\u8868\u76d8\uff0c\u5b98\u65b9\u6216\u7b2c\u4e09\u65b9\u63d0\u4f9b\u4e86\u5f88\u591a\u7684\u53ef\u9009\u4eea\u8868\u76d8\u3002<\/p>\n<p>BashBoard\u5730\u5740\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/grafana.com\/dashboards\">https:\/\/grafana.com\/dashboards<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u968f\u7740\u4e1a\u52a1\u7684\u8d8a\u53d1\u590d\u6742\uff0c\u5bf9\u8f6f\u4ef6\u7cfb\u7edf\u7684\u8981\u6c42\u8d8a\u6765\u8d8a\u9ad8\uff0c\u8fd9\u610f\u5473\u7740\u6211\u4eec\u9700\u8981\u968f\u65f6\u638c\u63a7\u7cfb\u7edf\u7684\u8fd0\u884c\u60c5\u51b5\u3002\u56e0\u6b64\uff0c\u5bf9\u7cfb\u7edf\u7684\u5b9e\u65f6\u76d1\u63a7\u4ee5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[386],"tags":[385],"class_list":["post-1546","post","type-post","status-publish","format-standard","hentry","category-monitor","tag-grafana"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1546"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1546\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}