{"id":78753,"date":"2026-02-28T04:41:04","date_gmt":"2026-02-27T20:41:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/78753.html"},"modified":"2026-02-28T04:41:04","modified_gmt":"2026-02-27T20:41:04","slug":"ubuntu-22-04%e4%b8%8bprometheusgrafana%e7%9b%91%e6%8e%a7%e5%a4%9a%e5%8f%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84%e4%bf%9d%e5%a7%86%e7%ba%a7%e6%95%99%e7%a8%8b%ef%bc%88%e5%90%ab%e5%b8%b8%e8%a7%81","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/78753.html","title":{"rendered":"Ubuntu 22.04\u4e0bPrometheus+Grafana\u76d1\u63a7\u591a\u53f0\u670d\u52a1\u5668\u7684\u4fdd\u59c6\u7ea7\u6559\u7a0b\uff08\u542b\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\uff09"},"content":{"rendered":"<h2>\u4ece\u96f6\u6784\u5efa\u4f60\u7684\u670d\u52a1\u5668\u76d1\u63a7\u4e2d\u67a2&#xff1a;Ubuntu 22.04\u4e0aPrometheus\u4e0eGrafana\u7684\u5b9e\u6218\u90e8\u7f72\u4e0e\u6df1\u5ea6\u8c03\u4f18<\/h2>\n<p>\u6700\u8fd1\u5728\u6574\u7406\u81ea\u5df1\u7684\u5f00\u53d1\u73af\u5883&#xff0c;\u53d1\u73b0\u624b\u5934\u7684\u51e0\u53f0\u4e91\u670d\u52a1\u5668\u548c\u672c\u5730\u865a\u62df\u673a\u72b6\u6001\u8d8a\u6765\u8d8a\u96be\u638c\u63e1\u3002CPU\u4f7f\u7528\u7387\u662f\u4e0d\u662f\u53c8\u5077\u5077\u8dd1\u6ee1\u4e86&#xff1f;\u5185\u5b58\u6cc4\u6f0f\u7684\u8fdb\u7a0b\u85cf\u5728\u54ea\u91cc&#xff1f;\u78c1\u76d8\u7a7a\u95f4\u8fd8\u5269\u591a\u5c11&#xff1f;\u6bcf\u6b21\u90fd\u8981\u4e00\u53f0\u53f0SSH\u767b\u5f55\u4e0a\u53bb\u6572\u547d\u4ee4&#xff0c;\u6548\u7387\u4f4e\u4e0b\u4e0d\u8bf4&#xff0c;\u8fd8\u5bb9\u6613\u9057\u6f0f\u5173\u952e\u544a\u8b66\u3002\u5bf9\u4e8e\u5c0f\u578b\u56e2\u961f\u6216\u4e2a\u4eba\u5f00\u53d1\u8005\u800c\u8a00&#xff0c;\u4e00\u5957\u8f7b\u91cf\u3001\u5f00\u6e90\u4e14\u529f\u80fd\u5f3a\u5927\u7684\u76d1\u63a7\u7cfb\u7edf&#xff0c;\u4e0d\u518d\u662f\u5927\u578b\u4f01\u4e1a\u7684\u4e13\u5c5e&#xff0c;\u800c\u662f\u63d0\u5347\u8fd0\u7ef4\u6548\u7387\u3001\u4fdd\u969c\u670d\u52a1\u7a33\u5b9a\u7684\u5fc5\u9700\u54c1\u3002<\/p>\n<p>\u4eca\u5929&#xff0c;\u6211\u4eec\u5c31\u6765\u4eb2\u624b\u642d\u5efa\u8fd9\u6837\u4e00\u5957\u7cfb\u7edf\u3002\u6838\u5fc3\u662fPrometheus&#xff0c;\u8fd9\u4e2a\u4e91\u539f\u751f\u65f6\u4ee3\u516c\u8ba4\u7684\u76d1\u63a7\u201c\u4e8b\u5b9e\u6807\u51c6\u201d&#xff0c;\u8d1f\u8d23\u6570\u636e\u7684\u6293\u53d6\u4e0e\u5b58\u50a8&#xff1b;\u642d\u914dGrafana&#xff0c;\u8fd9\u4e2a\u6570\u636e\u53ef\u89c6\u5316\u7684\u5229\u5668&#xff0c;\u5c06\u51b0\u51b7\u7684\u6570\u636e\u8f6c\u5316\u4e3a\u76f4\u89c2\u7684\u56fe\u8868\u3002\u6574\u4e2a\u90e8\u7f72\u57fa\u4e8eUbuntu 22.04 LTS&#xff0c;\u8fd9\u662f\u4e00\u4e2a\u957f\u671f\u652f\u6301\u4e14\u7a33\u5b9a\u7684\u53d1\u884c\u7248&#xff0c;\u975e\u5e38\u9002\u5408\u4f5c\u4e3a\u751f\u4ea7\u73af\u5883\u7684\u57fa\u7840\u3002\u6211\u4f1a\u5e26\u4f60\u8d70\u8fc7\u4ece\u73af\u5883\u51c6\u5907\u3001\u7ec4\u4ef6\u5b89\u88c5\u3001\u914d\u7f6e\u6574\u5408\u5230\u4eea\u8868\u76d8\u5b9a\u5236\u7684\u5b8c\u6574\u6d41\u7a0b&#xff0c;\u5e76\u91cd\u70b9\u5256\u6790\u90a3\u4e9b\u5bb9\u6613\u8e29\u5751\u7684\u73af\u8282&#xff0c;\u6bd4\u5982\u670d\u52a1\u542f\u52a8\u5931\u8d25\u3001\u7f51\u7edc\u8fde\u901a\u6027\u3001\u6743\u9650\u95ee\u9898\u7b49&#xff0c;\u8ba9\u4f60\u4e0d\u4ec5\u80fd\u201c\u642d\u8d77\u6765\u201d&#xff0c;\u66f4\u80fd\u201c\u7528\u5f97\u597d\u201d\u3002<\/p>\n<h3>1. \u67b6\u6784\u7406\u89e3\u4e0e\u73af\u5883\u89c4\u5212&#xff1a;\u6253\u597d\u5730\u57fa<\/h3>\n<p>\u5728\u52a8\u624b\u6572\u547d\u4ee4\u4e4b\u524d&#xff0c;\u82b1\u51e0\u5206\u949f\u7406\u89e3\u6574\u4e2a\u76d1\u63a7\u7cfb\u7edf\u7684\u8fd0\u4f5c\u903b\u8f91\u81f3\u5173\u91cd\u8981\u3002\u8fd9\u80fd\u5e2e\u52a9\u4f60\u5728\u9047\u5230\u95ee\u9898\u65f6&#xff0c;\u5feb\u901f\u5b9a\u4f4d\u662f\u6570\u636e\u91c7\u96c6\u3001\u4f20\u8f93\u8fd8\u662f\u5c55\u793a\u73af\u8282\u51fa\u4e86\u5c94\u5b50\u3002<\/p>\n<p>Prometheus \u91c7\u7528 \u62c9\u53d6&#xff08;Pull&#xff09;\u6a21\u578b\u3002\u8fd9\u610f\u5473\u7740\u76d1\u63a7\u670d\u52a1\u5668&#xff08;Prometheus Server&#xff09;\u4f1a\u4e3b\u52a8\u6309\u7167\u914d\u7f6e\u7684\u65f6\u95f4\u95f4\u9694&#xff0c;\u53bb\u8bbf\u95ee\u88ab\u76d1\u63a7\u76ee\u6807&#xff08;Targets&#xff09;\u4e0a\u66b4\u9732\u51fa\u7684 \/metrics \u63a5\u53e3&#xff0c;\u6293\u53d6\u6307\u6807\u6570\u636e\u3002\u8fd9\u4e0e\u8bb8\u591a\u9700\u8981\u4ee3\u7406\u63a8\u9001\u6570\u636e\u7684\u4f20\u7edf\u76d1\u63a7\u7cfb\u7edf\u4e0d\u540c\u3002\u5b83\u7684\u6838\u5fc3\u7ec4\u4ef6\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>Prometheus Server&#xff1a; \u4e3b\u670d\u52a1\u5668&#xff0c;\u8d1f\u8d23\u6293\u53d6\u3001\u5b58\u50a8\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u3002<\/li>\n<li>Exporters&#xff1a; \u51fa\u53e3\u5668&#xff0c;\u5b89\u88c5\u5728\u88ab\u76d1\u63a7\u76ee\u6807\u4e0a&#xff0c;\u5c06\u7cfb\u7edf\u6216\u5e94\u7528\u7684\u72b6\u6001\u8f6c\u6362\u4e3aPrometheus\u53ef\u8bfb\u7684\u6307\u6807\u683c\u5f0f\u3002\u6211\u4eec\u4e3b\u8981\u4f7f\u7528 node_exporter \u6765\u6536\u96c6\u4e3b\u673a\u5c42\u9762\u7684\u6307\u6807&#xff08;CPU\u3001\u5185\u5b58\u3001\u78c1\u76d8\u3001\u7f51\u7edc\u7b49&#xff09;\u3002<\/li>\n<li>Service Discovery&#xff1a; \u670d\u52a1\u53d1\u73b0&#xff0c;\u7528\u4e8e\u52a8\u6001\u7ba1\u7406\u76d1\u63a7\u76ee\u6807\u5217\u8868&#xff08;\u672c\u6587\u5148\u4f7f\u7528\u9759\u6001\u914d\u7f6e&#xff09;\u3002<\/li>\n<li>Alertmanager&#xff08;\u53ef\u9009&#xff09;&#xff1a; \u8d1f\u8d23\u5904\u7406\u7531Prometheus Server\u4ea7\u751f\u7684\u544a\u8b66&#xff0c;\u5e76\u8fdb\u884c\u53bb\u91cd\u3001\u5206\u7ec4\u3001\u8def\u7531\u548c\u901a\u77e5\u3002<\/li>\n<\/ul>\n<p>Grafana \u5219\u662f\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684\u5f00\u6e90\u5206\u6790\u548c\u53ef\u89c6\u5316Web\u5e94\u7528\u3002\u5b83\u672c\u8eab\u4e0d\u5b58\u50a8\u6570\u636e&#xff0c;\u800c\u662f\u4f5c\u4e3a\u4e00\u4e2a\u5f3a\u5927\u7684\u201c\u4eea\u8868\u76d8\u201d&#xff0c;\u4ece\u591a\u79cd\u6570\u636e\u6e90&#xff08;\u5982Prometheus\u3001MySQL\u3001InfluxDB\u7b49&#xff09;\u67e5\u8be2\u6570\u636e&#xff0c;\u5e76\u6e32\u67d3\u6210\u5404\u79cd\u7cbe\u7f8e\u7684\u56fe\u8868\u3002<\/p>\n<p>\u57fa\u4e8e\u8fd9\u4e2a\u67b6\u6784&#xff0c;\u6211\u5efa\u8bae\u4f60\u6309\u7167\u4ee5\u4e0b\u8868\u683c\u6765\u89c4\u5212\u4f60\u7684\u73af\u5883&#xff0c;\u8fd9\u4f1a\u8ba9\u540e\u7eed\u7684\u914d\u7f6e\u6e05\u6670\u5f88\u591a&#xff1a;<\/p>\n<table>\n<tr>\u89d2\u8272\u4e3b\u673a\u540d\u793a\u4f8bIP\u5730\u5740\u793a\u4f8b\u9700\u5b89\u88c5\u7684\u7ec4\u4ef6\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td style=\"text-align:left\">\u76d1\u63a7\u670d\u52a1\u5668<\/td>\n<td style=\"text-align:left\">monitor-server<\/td>\n<td style=\"text-align:left\">192.168.1.100<\/td>\n<td style=\"text-align:left\">Prometheus Server, Grafana<\/td>\n<td style=\"text-align:left\">\u6838\u5fc3\u63a7\u5236\u8282\u70b9&#xff0c;\u5efa\u8bae\u914d\u7f6e\u7a0d\u9ad8&#xff08;\u59822\u68384G&#xff09;\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u88ab\u76d1\u63a7\u8282\u70b9A<\/td>\n<td style=\"text-align:left\">web-server-01<\/td>\n<td style=\"text-align:left\">192.168.1.101<\/td>\n<td style=\"text-align:left\">node_exporter<\/td>\n<td style=\"text-align:left\">\u53ef\u4ee5\u662f\u4efb\u4f55\u9700\u8981\u76d1\u63a7\u7684Linux\u670d\u52a1\u5668\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u88ab\u76d1\u63a7\u8282\u70b9B<\/td>\n<td style=\"text-align:left\">db-server-01<\/td>\n<td style=\"text-align:left\">192.168.1.102<\/td>\n<td style=\"text-align:left\">node_exporter<\/td>\n<td style=\"text-align:left\">\u540c\u4e0a\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:left\">\u88ab\u76d1\u63a7\u8282\u70b9&#8230;<\/td>\n<td style=\"text-align:left\">&#8230;<\/td>\n<td style=\"text-align:left\">&#8230;<\/td>\n<td style=\"text-align:left\">node_exporter<\/td>\n<td style=\"text-align:left\">\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\u65e0\u9650\u6269\u5c55\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6ce8\u610f&#xff1a;\u5728\u751f\u4ea7\u73af\u5883\u4e2d&#xff0c;\u8bf7\u786e\u4fdd\u76d1\u63a7\u670d\u52a1\u5668\u4e0e\u88ab\u76d1\u63a7\u8282\u70b9\u4e4b\u95f4\u7684\u7f51\u7edc\u662f\u4e92\u901a\u7684&#xff0c;\u5e76\u4e14\u9632\u706b\u5899\u89c4\u5219\u5141\u8bb8\u76f8\u5173\u7aef\u53e3\u7684\u8bbf\u95ee&#xff08;Prometheus\u9ed8\u8ba4\u7aef\u53e39090&#xff0c;node_exporter\u9ed8\u8ba4\u7aef\u53e39100&#xff0c;Grafana\u9ed8\u8ba4\u7aef\u53e33000&#xff09;\u3002<\/p>\n<p>\u89c4\u5212\u597d\u540e&#xff0c;\u8bf7\u786e\u4fdd\u6240\u6709\u670d\u52a1\u5668\u90fd\u5df2\u5b89\u88c5Ubuntu 22.04&#xff0c;\u5e76\u62e5\u6709\u4e00\u4e2a\u5177\u6709sudo\u6743\u9650\u7684\u975eroot\u7528\u6237\u3002\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u5c06\u4ece\u76d1\u63a7\u670d\u52a1\u5668\u5f00\u59cb\u3002<\/p>\n<h3>2. \u76d1\u63a7\u670d\u52a1\u5668\u6838\u5fc3&#xff1a;Prometheus\u7684\u5b89\u88c5\u4e0e\u7cbe\u7ec6\u914d\u7f6e<\/h3>\n<p>\u9996\u5148\u767b\u5f55\u5230\u4f60\u7684\u76d1\u63a7\u670d\u52a1\u5668&#xff08;\u4f8b\u5982 monitor-server&#xff09;\u3002<\/p>\n<h4>2.1 \u5b89\u88c5Prometheus<\/h4>\n<p>Ubuntu 22.04\u7684\u5b98\u65b9\u4ed3\u5e93\u4e2d\u5df2\u7ecf\u5305\u542b\u4e86\u8f83\u65b0\u7248\u672c\u7684Prometheus&#xff0c;\u76f4\u63a5\u4f7f\u7528apt\u5b89\u88c5\u662f\u6700\u7b80\u5355\u7a33\u5b9a\u7684\u65b9\u5f0f\u3002<\/p>\n<p># \u9996\u5148\u66f4\u65b0\u672c\u5730\u8f6f\u4ef6\u5305\u7d22\u5f15<br \/>\nsudo apt update<\/p>\n<p># \u5b89\u88c5Prometheus<br \/>\nsudo apt install prometheus -y<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u7cfb\u7edf\u4f1a\u81ea\u52a8\u521b\u5efa prometheus \u7528\u6237\u548c\u7ec4&#xff0c;\u5e76\u914d\u7f6e\u4e00\u4e2asystemd\u670d\u52a1\u5355\u5143\u3002\u4f46\u9ed8\u8ba4\u914d\u7f6e\u53ef\u80fd\u4e0d\u7b26\u5408\u6211\u4eec\u7684\u9700\u6c42&#xff0c;\u9700\u8981\u68c0\u67e5\u548c\u8c03\u6574\u3002<\/p>\n<h4>2.2 \u6df1\u5165\u89e3\u8bfb\u4e0e\u914d\u7f6ePrometheus<\/h4>\n<p>Prometheus\u7684\u4e3b\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8e \/etc\/prometheus\/prometheus.yml\u3002\u8ba9\u6211\u4eec\u5148\u67e5\u770b\u5e76\u7406\u89e3\u5b83\u7684\u7ed3\u6784&#xff1a;<\/p>\n<p>sudo cat \/etc\/prometheus\/prometheus.yml<\/p>\n<p>\u4f60\u4f1a\u770b\u5230\u4e00\u4e2aYAML\u683c\u5f0f\u7684\u914d\u7f6e\u6587\u4ef6\u3002\u5173\u952e\u90e8\u5206\u89e3\u6790\u5982\u4e0b&#xff1a;<\/p>\n<p>global:<br \/>\n  scrape_interval: 15s      # \u5168\u5c40\u6293\u53d6\u95f4\u9694&#xff0c;\u6bcf15\u79d2\u6293\u53d6\u4e00\u6b21\u6307\u6807<br \/>\n  evaluation_interval: 15s   # \u89c4\u5219\u8bc4\u4f30\u95f4\u9694&#xff0c;\u6bcf15\u79d2\u8bc4\u4f30\u4e00\u6b21\u544a\u8b66\u89c4\u5219<\/p>\n<p>scrape_configs:<br \/>\n  &#8211; job_name: &#039;prometheus&#039;   # \u7b2c\u4e00\u4e2a\u6293\u53d6\u4efb\u52a1&#xff1a;\u76d1\u63a7Prometheus\u81ea\u8eab<br \/>\n    static_configs:<br \/>\n      &#8211; targets: [&#039;localhost:9090&#039;] # \u76ee\u6807\u5730\u5740<\/p>\n<p>  &#8211; job_name: &#039;node&#039;         # \u7b2c\u4e8c\u4e2a\u6293\u53d6\u4efb\u52a1&#xff1a;\u76d1\u63a7\u8282\u70b9&#xff08;\u76ee\u524d\u53ea\u6709\u672c\u673a&#xff09;<br \/>\n    static_configs:<br \/>\n      &#8211; targets: [&#039;localhost:9100&#039;]<\/p>\n<p>\u73b0\u5728&#xff0c;\u6211\u4eec\u9700\u8981\u4fee\u6539\u8fd9\u4e2a\u914d\u7f6e&#xff0c;\u5c06\u6211\u4eec\u7684\u88ab\u76d1\u63a7\u8282\u70b9\u6dfb\u52a0\u8fdb\u53bb\u3002\u5047\u8bbe\u6211\u4eec\u6709\u4e24\u53f0\u88ab\u76d1\u63a7\u8282\u70b9&#xff0c;IP\u5206\u522b\u662f 192.168.1.101 \u548c 192.168.1.102\u3002<\/p>\n<p>\u4f7f\u7528 sudo vim \/etc\/prometheus\/prometheus.yml \u7f16\u8f91\u6587\u4ef6&#xff0c;\u627e\u5230 job_name: &#039;node&#039; \u90e8\u5206&#xff0c;\u4fee\u6539 targets \u5217\u8868&#xff1a;<\/p>\n<p>  &#8211; job_name: &#039;node&#039;<br \/>\n    # \u5982\u679c\u6293\u53d6\u6162&#xff0c;\u53ef\u4ee5\u5355\u72ec\u4e3a\u8fd9\u4e2a\u4efb\u52a1\u8bbe\u7f6e\u66f4\u77ed\u7684\u8d85\u65f6\u65f6\u95f4<br \/>\n    scrape_timeout: 10s<br \/>\n    static_configs:<br \/>\n      &#8211; targets:<br \/>\n        &#8211; &#039;localhost:9100&#039;          # \u76d1\u63a7\u670d\u52a1\u5668\u81ea\u8eab<br \/>\n        &#8211; &#039;192.168.1.101:9100&#039;     # \u88ab\u76d1\u63a7\u8282\u70b9A<br \/>\n        &#8211; &#039;192.168.1.102:9100&#039;     # \u88ab\u76d1\u63a7\u8282\u70b9B<br \/>\n        # \u53ef\u4ee5\u7ee7\u7eed\u5728\u6b64\u6dfb\u52a0\u66f4\u591a\u8282\u70b9<\/p>\n<p>\u4e3a\u4e86\u540e\u7eed\u5728Grafana\u4e2d\u80fd\u66f4\u597d\u5730\u5206\u7ec4\u7b5b\u9009&#xff0c;\u6211\u4eec\u8fd8\u53ef\u4ee5\u4e3a\u4e0d\u540c\u7ec4\u7684\u673a\u5668\u6dfb\u52a0\u6807\u7b7e&#xff08;labels&#xff09;\u3002\u4f8b\u5982&#xff0c;\u5c06Web\u670d\u52a1\u5668\u548c\u6570\u636e\u5e93\u670d\u52a1\u5668\u5206\u7ec4&#xff1a;<\/p>\n<p>  &#8211; job_name: &#039;node&#039;<br \/>\n    static_configs:<br \/>\n      &#8211; targets: [&#039;192.168.1.101:9100&#039;, &#039;192.168.1.102:9100&#039;]<br \/>\n        labels:<br \/>\n          group: &#039;web-servers&#039;   # \u4e3a\u8fd9\u7ec4\u76ee\u6807\u6dfb\u52a0\u4e00\u4e2a\u6807\u7b7e<br \/>\n      &#8211; targets: [&#039;192.168.1.103:9100&#039;]<br \/>\n        labels:<br \/>\n          group: &#039;db-servers&#039;<\/p>\n<h4>2.3 \u542f\u52a8\u670d\u52a1\u4e0e\u6392\u9519\u6307\u5357<\/h4>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e&#xff0c;\u9700\u8981\u91cd\u542fPrometheus\u670d\u52a1\u4ee5\u52a0\u8f7d\u65b0\u914d\u7f6e&#xff0c;\u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u3002<\/p>\n<p># \u91cd\u542f\u670d\u52a1<br \/>\nsudo systemctl restart prometheus<\/p>\n<p># \u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<br \/>\nsudo systemctl enable prometheus<\/p>\n<p># \u68c0\u67e5\u670d\u52a1\u72b6\u6001&#xff0c;\u8fd9\u662f\u6700\u91cd\u8981\u7684\u6392\u9519\u7b2c\u4e00\u6b65&#xff01;<br \/>\nsudo systemctl status prometheus<\/p>\n<p>\u5982\u679c status \u547d\u4ee4\u663e\u793a active (running)&#xff0c;\u606d\u559c\u4f60&#xff0c;\u7b2c\u4e00\u6b65\u6210\u529f\u4e86\u3002\u4f46\u66f4\u5e38\u89c1\u7684\u662f\u9047\u5230\u95ee\u9898\u3002\u8fd9\u91cc\u6709\u51e0\u4e2a\u5173\u952e\u6392\u9519\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u72b6\u6001\u663e\u793a failed&#xff1a; \u9996\u5148\u67e5\u770b\u8be6\u7ec6\u7684\u9519\u8bef\u65e5\u5fd7\u3002sudo journalctl -u prometheus -f &#8211;lines&#061;50\n<p>\u6700\u5e38\u89c1\u7684\u9519\u8bef\u662f \u914d\u7f6e\u6587\u4ef6\u8bed\u6cd5\u9519\u8bef\u3002YAML\u5bf9\u7f29\u8fdb\u975e\u5e38\u654f\u611f&#xff0c;\u52a1\u5fc5\u4f7f\u7528\u7a7a\u683c\u800c\u975eTab\u952e\u3002\u53ef\u4ee5\u4f7f\u7528 promtool \u5de5\u5177\u68c0\u67e5\u914d\u7f6e&#xff1a;sudo promtool check config \/etc\/prometheus\/prometheus.yml<\/p>\n<\/li>\n<li>\u670d\u52a1\u72b6\u6001 active&#xff0c;\u4f46Web\u754c\u9762\u65e0\u6cd5\u8bbf\u95ee&#xff1a; \u8fd9\u901a\u5e38\u662f\u9632\u706b\u5899\u6216\u5b89\u5168\u7ec4\u95ee\u9898\u3002\n<ul>\n<li>\u68c0\u67e5\u672c\u5730\u9632\u706b\u5899&#xff1a;sudo ufw status\u3002\u5982\u679c\u542f\u7528&#xff0c;\u9700\u8981\u653e\u884c9090\u7aef\u53e3&#xff1a;sudo ufw allow 9090\u3002<\/li>\n<li>\u5982\u679c\u662f\u4e91\u670d\u52a1\u5668&#xff0c;\u8bf7\u767b\u5f55\u4e91\u63a7\u5236\u53f0&#xff0c;\u68c0\u67e5\u5b89\u5168\u7ec4\u89c4\u5219\u662f\u5426\u5141\u8bb8\u5165\u7ad9\u6d41\u91cf\u52309090\u7aef\u53e3\u3002<\/li>\n<\/ul>\n<\/li>\n<li>Prometheus\u65e0\u6cd5\u6293\u53d6\u5176\u4ed6\u8282\u70b9\u7684\u6570\u636e&#xff1a; \u5728Prometheus\u7684Web\u754c\u9762&#xff08;http:\/\/&lt;\u76d1\u63a7\u670d\u52a1\u5668IP&gt;:9090&#xff09;\u7684 Status -&gt; Targets \u9875\u9762&#xff0c;\u53ef\u4ee5\u770b\u5230\u6240\u6709\u914d\u7f6e\u7684\u6293\u53d6\u76ee\u6807\u72b6\u6001\u3002\n<ul>\n<li>\u5982\u679c\u72b6\u6001\u4e3a DOWN&#xff0c;\u9996\u5148\u786e\u4fdd\u76ee\u6807\u8282\u70b9\u7684 node_exporter \u670d\u52a1\u5df2\u8fd0\u884c&#xff08;\u4e0b\u4e00\u6b65\u4f1a\u88c5&#xff09;\u3002<\/li>\n<li>\u7136\u540e\u5728\u76d1\u63a7\u670d\u52a1\u5668\u4e0a\u6d4b\u8bd5\u7f51\u7edc\u8fde\u901a\u6027&#xff1a;telnet 192.168.1.101 9100&#xff08;\u5982\u672a\u5b89\u88c5telnet&#xff0c;\u4f7f\u7528 nc -zv 192.168.1.101 9100&#xff09;\u3002\u5982\u679c\u4e0d\u901a&#xff0c;\u68c0\u67e5\u76ee\u6807\u8282\u70b9\u7684\u9632\u706b\u5899\u662f\u5426\u653e\u884c\u4e869100\u7aef\u53e3\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>3. \u88ab\u76d1\u63a7\u8282\u70b9&#xff1a;\u90e8\u7f72node_exporter\u91c7\u96c6\u6570\u636e<\/h3>\n<p>\u73b0\u5728\u767b\u5f55\u5230\u6bcf\u4e00\u53f0\u9700\u8981\u88ab\u76d1\u63a7\u7684\u670d\u52a1\u5668\u4e0a&#xff08;\u4f8b\u5982 web-server-01&#xff09;&#xff0c;\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\u3002<\/p>\n<h4>3.1 \u5b89\u88c5\u4e0e\u542f\u52a8node_exporter<\/h4>\n<p>\u540c\u6837&#xff0c;\u4f7f\u7528apt\u5b89\u88c5&#xff1a;<\/p>\n<p>sudo apt update<br \/>\nsudo apt install prometheus-node-exporter -y<\/p>\n<p>\u5b89\u88c5\u540e&#xff0c;node_exporter\u670d\u52a1\u4f1a\u81ea\u52a8\u542f\u52a8\u5e76\u542f\u7528\u5f00\u673a\u81ea\u542f\u3002\u9a8c\u8bc1\u4e00\u4e0b&#xff1a;<\/p>\n<p>sudo systemctl status prometheus-node-exporter<\/p>\n<p>\u4f60\u5e94\u8be5\u80fd\u770b\u5230\u670d\u52a1\u5904\u4e8e\u6d3b\u8dc3\u72b6\u6001&#xff0c;\u5e76\u76d1\u542c\u5728 0.0.0.0:9100\u3002\u8fd9\u610f\u5473\u7740\u5b83\u5df2\u7ecf\u51c6\u5907\u597d\u5411\u4efb\u4f55\u80fd\u8bbf\u95ee\u8be5\u7aef\u53e3\u7684\u4e3b\u673a\u63d0\u4f9b\u6307\u6807\u6570\u636e\u3002<\/p>\n<h4>3.2 \u5b89\u5168\u52a0\u56fa\u4e0e\u9632\u706b\u5899\u914d\u7f6e<\/h4>\n<p>\u51fa\u4e8e\u5b89\u5168\u8003\u8651&#xff0c;\u6211\u4eec\u901a\u5e38\u4e0d\u5e0c\u671b9100\u7aef\u53e3\u5bf9\u516c\u7f51\u5f00\u653e\u3002\u53ef\u4ee5\u901a\u8fc7\u9632\u706b\u5899\u8fdb\u884c\u9650\u5236\u3002<\/p>\n<ul>\n<li>\u5982\u679c\u4f7f\u7528UFW&#xff08;Ubuntu\u9ed8\u8ba4&#xff09;&#xff1a;# \u5047\u8bbe\u53ea\u5141\u8bb8\u76d1\u63a7\u670d\u52a1\u5668 192.168.1.100 \u8bbf\u95ee<br \/>\nsudo ufw allow from 192.168.1.100 to any port 9100<br \/>\nsudo ufw reload<\/p>\n<\/li>\n<li>\u5982\u679c\u4f7f\u7528iptables&#xff1a;sudo iptables -A INPUT -p tcp -s 192.168.1.100 &#8211;dport 9100 -j ACCEPT<br \/>\n# \u8bb0\u5f97\u4fdd\u5b58\u89c4\u5219&#xff0c;\u5177\u4f53\u547d\u4ee4\u53d6\u51b3\u4e8e\u4f60\u7684\u7cfb\u7edf\u914d\u7f6e<\/p>\n<\/li>\n<\/ul>\n<h4>3.3 \u9a8c\u8bc1\u6570\u636e\u91c7\u96c6<\/h4>\n<p>\u5728\u88ab\u76d1\u63a7\u8282\u70b9\u4e0a&#xff0c;\u4f60\u53ef\u4ee5\u76f4\u63a5curl\u672c\u5730\u63a5\u53e3&#xff0c;\u770b\u770bnode_exporter\u662f\u5426\u5728\u8f93\u51fa\u6307\u6807&#xff1a;<\/p>\n<p>curl http:\/\/localhost:9100\/metrics | head -20<\/p>\n<p>\u8fd9\u4f1a\u8f93\u51fa\u4e00\u5927\u5806\u4ee5 # HELP \u548c # TYPE \u5f00\u5934\u7684\u6ce8\u91ca\u884c&#xff0c;\u4ee5\u53ca\u50cf node_cpu_seconds_total{cpu&#061;&#034;0&#034;,mode&#061;&#034;idle&#034;} \u8fd9\u6837\u7684\u6307\u6807\u884c\u3002\u770b\u5230\u8fd9\u4e9b&#xff0c;\u8bf4\u660enode_exporter\u5de5\u4f5c\u6b63\u5e38\u3002<\/p>\n<p>\u56de\u5230\u76d1\u63a7\u670d\u52a1\u5668\u7684Prometheus Web\u754c\u9762&#xff08;http:\/\/&lt;\u76d1\u63a7\u670d\u52a1\u5668IP&gt;:9090&#xff09;&#xff0c;\u5728\u9876\u90e8\u8868\u8fbe\u5f0f\u8f93\u5165\u6846\u91cc&#xff0c;\u5c1d\u8bd5\u8f93\u5165\u4e00\u4e2a\u7b80\u5355\u7684\u6307\u6807\u540d&#xff0c;\u6bd4\u5982 node_memory_MemAvailable_bytes&#xff0c;\u70b9\u51fb Execute&#xff0c;\u5982\u679c\u80fd\u5728 Graph \u6216 Console \u6807\u7b7e\u9875\u4e0b\u770b\u5230\u6570\u636e&#xff0c;\u5c31\u8bc1\u660ePrometheus\u5df2\u7ecf\u6210\u529f\u4ece\u8be5\u8282\u70b9\u6293\u53d6\u5230\u4e86\u6570\u636e&#xff01;<\/p>\n<h3>4. \u6570\u636e\u53ef\u89c6\u5316\u5927\u5e08&#xff1a;Grafana\u7684\u5b89\u88c5\u4e0e\u4eea\u8868\u76d8\u6253\u9020<\/h3>\n<p>\u6570\u636e\u5df2\u7ecf\u6293\u53d6\u5e76\u5b58\u50a8\u5728Prometheus\u4e2d&#xff0c;\u73b0\u5728\u662f\u65f6\u5019\u8ba9\u5b83\u4eec\u201c\u8bf4\u8bdd\u201d\u4e86\u3002\u6211\u4eec\u56de\u5230\u76d1\u63a7\u670d\u52a1\u5668\u5b89\u88c5Grafana\u3002<\/p>\n<h4>4.1 \u5b89\u88c5Grafana<\/h4>\n<p>Grafana\u5e76\u672a\u5305\u542b\u5728Ubuntu\u9ed8\u8ba4\u4ed3\u5e93\u4e2d&#xff0c;\u9700\u8981\u6dfb\u52a0\u5176\u5b98\u65b9\u4ed3\u5e93\u3002<\/p>\n<p># \u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u4ee5\u901a\u8fc7HTTPS\u6dfb\u52a0\u4ed3\u5e93<br \/>\nsudo apt install -y software-properties-common wget apt-transport-https<\/p>\n<p># \u5bfc\u5165Grafana\u7684GPG\u5bc6\u94a5<br \/>\nsudo wget -q -O &#8211; https:\/\/packages.grafana.com\/gpg.key | sudo apt-key add &#8211;<\/p>\n<p># \u6dfb\u52a0\u7a33\u5b9a\u7248\u4ed3\u5e93<br \/>\necho &#034;deb https:\/\/packages.grafana.com\/oss\/deb stable main&#034; | sudo tee \/etc\/apt\/sources.list.d\/grafana.list<\/p>\n<p># \u66f4\u65b0\u5e76\u5b89\u88c5Grafana<br \/>\nsudo apt update<br \/>\nsudo apt install grafana -y<\/p>\n<h4>4.2 \u542f\u52a8\u5e76\u8bbf\u95eeGrafana<\/h4>\n<p>\u542f\u52a8\u670d\u52a1\u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f&#xff1a;<\/p>\n<p>sudo systemctl start grafana-server<br \/>\nsudo systemctl enable grafana-server<br \/>\nsudo systemctl status grafana-server  # \u786e\u8ba4\u72b6\u6001<\/p>\n<p>\u73b0\u5728&#xff0c;\u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u8bbf\u95ee http:\/\/&lt;\u76d1\u63a7\u670d\u52a1\u5668IP&gt;:3000\u3002\u4f60\u5c06\u770b\u5230Grafana\u7684\u767b\u5f55\u9875\u9762\u3002\u9ed8\u8ba4\u7528\u6237\u540d\u548c\u5bc6\u7801\u90fd\u662f admin\u3002\u9996\u6b21\u767b\u5f55\u4f1a\u5f3a\u5236\u8981\u6c42\u4f60\u4fee\u6539\u5bc6\u7801&#xff0c;\u8bf7\u52a1\u5fc5\u8bbe\u7f6e\u4e00\u4e2a\u5f3a\u5bc6\u7801\u3002<\/p>\n<h4>4.3 \u8fde\u63a5Prometheus\u6570\u636e\u6e90<\/h4>\n<p>\u767b\u5f55\u540e&#xff0c;\u7b2c\u4e00\u6b65\u662f\u544a\u8bc9Grafana\u6570\u636e\u5728\u54ea\u91cc\u3002<\/p>\n<li>\u70b9\u51fb\u5de6\u4fa7\u5bfc\u822a\u680f\u7684 \u9f7f\u8f6e\u56fe\u6807&#xff08;Configuration&#xff09; -&gt; Data Sources\u3002<\/li>\n<li>\u70b9\u51fb Add data source \u6309\u94ae\u3002<\/li>\n<li>\u9009\u62e9 Prometheus\u3002<\/li>\n<li>\u5728 HTTP \u90e8\u5206\u7684 URL \u5b57\u6bb5\u4e2d&#xff0c;\u586b\u5199 http:\/\/localhost:9090&#xff08;\u56e0\u4e3aGrafana\u548cPrometheus\u88c5\u5728\u540c\u4e00\u53f0\u670d\u52a1\u5668\u4e0a&#xff09;\u3002\u5982\u679c\u4e0d\u5728\u540c\u4e00\u53f0&#xff0c;\u5219\u586b\u5199Prometheus\u670d\u52a1\u5668\u7684\u5b9e\u9645\u5730\u5740\u3002<\/li>\n<li>\u5176\u4ed6\u8bbe\u7f6e\u53ef\u4ee5\u4fdd\u6301\u9ed8\u8ba4&#xff0c;\u6eda\u52a8\u5230\u9875\u9762\u5e95\u90e8&#xff0c;\u70b9\u51fb Save &amp; test\u3002\u5982\u679c\u770b\u5230\u7eff\u8272\u7684 \u201cData source is working\u201d \u63d0\u793a\u6846&#xff0c;\u8bf4\u660e\u8fde\u63a5\u6210\u529f\u3002<\/li>\n<h4>4.4 \u5bfc\u5165\u70ab\u9177\u7684\u4eea\u8868\u76d8<\/h4>\n<p>\u4ece\u5934\u521b\u5efa\u4eea\u8868\u76d8\u5f88\u8d39\u65f6\u95f4&#xff0c;\u793e\u533a\u63d0\u4f9b\u4e86\u5927\u91cf\u4f18\u79c0\u7684\u6a21\u677f\u3002\u6700\u6d41\u884c\u7684Linux\u4e3b\u673a\u76d1\u63a7\u4eea\u8868\u76d8\u4e4b\u4e00\u662f Node Exporter Full&#xff08;ID: 1860&#xff09;\u3002<\/p>\n<p>\u64cd\u4f5c\u6b65\u9aa4\u5982\u4e0b&#xff1a;<\/p>\n<li>\u5728Grafana\u754c\u9762&#xff0c;\u70b9\u51fb\u5de6\u4fa7 \u7530\u5b57\u683c\u56fe\u6807&#xff08;Dashboards&#xff09; -&gt; New -&gt; Import\u3002<\/li>\n<li>\u5728 Import via grafana.com \u8f93\u5165\u6846\u4e2d&#xff0c;\u586b\u5165\u4eea\u8868\u76d8ID 1860&#xff0c;\u7136\u540e\u70b9\u51fb Load\u3002<\/li>\n<li>\u5728\u4e0b\u4e00\u4e2a\u9875\u9762&#xff0c;\u4e3a\u4eea\u8868\u76d8\u547d\u540d&#xff0c;\u5e76\u786e\u4fdd Prometheus \u6570\u636e\u6e90\u9009\u62e9\u6b63\u786e&#xff08;\u5c31\u662f\u4f60\u521a\u624d\u6dfb\u52a0\u7684\u90a3\u4e2a&#xff09;\u3002<\/li>\n<li>\u70b9\u51fb Import\u3002<\/li>\n<p>\u77ac\u95f4&#xff0c;\u4e00\u4e2a\u529f\u80fd\u6781\u5176\u4e30\u5bcc\u3001\u56fe\u8868\u4e13\u4e1a\u7684\u670d\u52a1\u5668\u76d1\u63a7\u4eea\u8868\u76d8\u5c31\u51fa\u73b0\u5728\u4f60\u9762\u524d&#xff01;\u5b83\u5305\u542b\u4e86CPU\u3001\u5185\u5b58\u3001\u78c1\u76d8IO\u3001\u7f51\u7edc\u6d41\u91cf\u3001\u7cfb\u7edf\u8d1f\u8f7d\u3001\u8fdb\u7a0b\u6570\u7b49\u51e0\u4e4e\u6240\u6709\u4f60\u5173\u5fc3\u7684\u7ef4\u5ea6\u3002<\/p>\n<p>\u4f60\u53ef\u4ee5\u6839\u636e\u524d\u9762\u5728Prometheus\u914d\u7f6e\u4e2d\u8bbe\u7f6e\u7684 group \u6807\u7b7e&#xff0c;\u5728\u4eea\u8868\u76d8\u9876\u90e8\u7684\u53d8\u91cf\u4e0b\u62c9\u6846\u4e2d\u8fdb\u884c\u7b5b\u9009&#xff0c;\u5206\u522b\u67e5\u770b\u201cweb-servers\u201d\u6216\u201cdb-servers\u201d\u7ec4\u7684\u6570\u636e\u3002<\/p>\n<h4>4.5 \u4eea\u8868\u76d8\u4e2a\u6027\u5316\u4e0e\u544a\u8b66\u8bbe\u7f6e&#xff08;\u8fdb\u9636&#xff09;<\/h4>\n<p>\u4e2a\u6027\u5316&#xff1a; \u4f60\u53ef\u4ee5\u70b9\u51fb\u4efb\u4f55\u56fe\u8868\u7684\u6807\u9898&#xff0c;\u9009\u62e9 Edit&#xff0c;\u8fdb\u5165\u9762\u677f\u7f16\u8f91\u6a21\u5f0f\u3002\u5728\u8fd9\u91cc\u53ef\u4ee5\u4fee\u6539\u67e5\u8be2\u8bed\u53e5&#xff08;PromQL&#xff09;\u3001\u8c03\u6574\u53ef\u89c6\u5316\u7c7b\u578b&#xff08;\u5982\u56fe\u5f62\u3001\u4eea\u8868\u3001\u8868\u683c\u7b49&#xff09;\u3001\u8bbe\u7f6e\u9608\u503c\u548c\u989c\u8272\u3002\u8fd9\u662f\u6df1\u5165\u5b66\u4e60PromQL\u548cGrafana\u7684\u597d\u673a\u4f1a\u3002<\/p>\n<p>\u544a\u8b66\u8bbe\u7f6e&#xff1a; Grafana\u5185\u7f6e\u4e86\u5f3a\u5927\u7684\u544a\u8b66\u5f15\u64ce\u3002\u4f8b\u5982&#xff0c;\u4f60\u60f3\u5728\u67d0\u4e2a\u670d\u52a1\u5668\u7684\u53ef\u7528\u5185\u5b58\u4f4e\u4e8e10%\u65f6\u6536\u5230\u901a\u77e5\u3002<\/p>\n<li>\u5728\u521a\u624d\u5bfc\u5165\u7684\u4eea\u8868\u76d8\u4e2d&#xff0c;\u627e\u5230\u5185\u5b58\u76f8\u5173\u7684\u56fe\u8868&#xff0c;\u70b9\u51fb\u6807\u9898 -&gt; Edit\u3002<\/li>\n<li>\u5207\u6362\u5230 Alert \u6807\u7b7e\u9875&#xff0c;\u70b9\u51fb Create alert rule from this panel\u3002<\/li>\n<li>\u914d\u7f6e\u544a\u8b66\u6761\u4ef6&#xff0c;\u4f8b\u5982&#xff1a;WHEN last() OF query(A, 5m, now) IS BELOW 0.1&#xff08;\u5047\u8bbe\u67e5\u8be2A\u8fd4\u56de\u7684\u662f\u5185\u5b58\u4f7f\u7528\u7387&#xff09;\u3002<\/li>\n<li>\u5728 Notifications \u90e8\u5206&#xff0c;\u53ef\u4ee5\u914d\u7f6e\u544a\u8b66\u6e20\u9053&#xff0c;\u5982\u90ae\u4ef6\u3001Slack\u3001\u9489\u9489\u3001Webhook\u7b49\u3002\u8fd9\u9700\u8981\u5148\u5728 Configuration -&gt; Alerting -&gt; Notification channels \u4e2d\u8bbe\u7f6e\u597d\u6e20\u9053\u3002<\/li>\n<h3>5. \u751f\u4ea7\u73af\u5883\u8fdb\u9636\u8003\u91cf\u4e0e\u4f18\u5316\u6280\u5de7<\/h3>\n<p>\u5f53\u4f60\u7684\u76d1\u63a7\u7cfb\u7edf\u4ece\u201c\u80fd\u7528\u201d\u8d70\u5411\u201c\u597d\u7528\u201d\u65f6&#xff0c;\u4e0b\u9762\u8fd9\u4e9b\u70b9\u503c\u5f97\u5173\u6ce8\u3002<\/p>\n<p>1. \u914d\u7f6e\u7ba1\u7406\u81ea\u52a8\u5316&#xff1a;<br \/>\n\u624b\u52a8\u7f16\u8f91YAML\u6587\u4ef6\u548c\u7ba1\u7406\u591a\u4e2a\u8282\u70b9\u7684exporter\u5728\u670d\u52a1\u5668\u6570\u91cf\u589e\u957f\u540e\u4f1a\u53d8\u5f97\u7e41\u7410\u3002\u8003\u8651\u4f7f\u7528Ansible\u3001SaltStack\u6216Terraform\u7b49\u5de5\u5177&#xff0c;\u5c06Prometheus\u914d\u7f6e\u3001node_exporter\u5b89\u88c5\u548c\u9632\u706b\u5899\u89c4\u5219\u914d\u7f6e\u90fd\u4ee3\u7801\u5316\u3001\u81ea\u52a8\u5316\u3002<\/p>\n<p>2. Prometheus\u6570\u636e\u6301\u4e45\u5316\u4e0e\u4fdd\u7559\u7b56\u7565&#xff1a;<br \/>\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;Prometheus\u6570\u636e\u5b58\u50a8\u5728 \/var\/lib\/prometheus\/ \u4e0b\u3002\u4f60\u9700\u8981\u5173\u6ce8\u78c1\u76d8\u7a7a\u95f4\u3002\u53ef\u4ee5\u5728 prometheus.yml \u7684\u540c\u7ea7\u76ee\u5f55\u4e0b\u521b\u5efa\u6216\u4fee\u6539 prometheus.yml \u7684\u5168\u5c40\u914d\u7f6e&#xff0c;\u6216\u901a\u8fc7\u670d\u52a1\u542f\u52a8\u53c2\u6570\u6765\u8bbe\u7f6e\u6570\u636e\u4fdd\u7559\u65f6\u95f4\u3002<\/p>\n<p># \u5728 prometheus.yml \u7684 global \u90e8\u5206\u6dfb\u52a0<br \/>\nglobal:<br \/>\n  scrape_interval: 15s<br \/>\n  evaluation_interval: 15s<br \/>\n  # \u8bbe\u7f6e\u6570\u636e\u4fdd\u7559\u65f6\u95f4\u4e3a30\u5929<br \/>\n  retention_time: 30d<\/p>\n<p>\u6216\u8005&#xff0c;\u7f16\u8f91systemd\u670d\u52a1\u6587\u4ef6 \/etc\/systemd\/system\/prometheus.service.d\/custom.conf&#xff08;\u5982\u4e0d\u5b58\u5728\u5219\u521b\u5efa&#xff09;&#xff1a;<\/p>\n<p>[Service]<br \/>\nExecStart&#061;<br \/>\nExecStart&#061;\/usr\/bin\/prometheus &#8211;config.file&#061;\/etc\/prometheus\/prometheus.yml &#8211;storage.tsdb.retention.time&#061;30d &#8211;web.console.templates&#061;\/usr\/share\/prometheus\/consoles &#8211;web.console.libraries&#061;\/usr\/share\/prometheus\/console_libraries<\/p>\n<p>\u7136\u540e\u6267\u884c sudo systemctl daemon-reload \u548c sudo systemctl restart prometheus\u3002<\/p>\n<p>3. \u76d1\u63a7\u9ad8\u53ef\u7528\u4e0e\u5206\u7247&#xff1a;<br \/>\n\u5bf9\u4e8e\u66f4\u5173\u952e\u7684\u73af\u5883&#xff0c;\u5355\u4e00\u7684Prometheus\u670d\u52a1\u5668\u53ef\u80fd\u6210\u4e3a\u5355\u70b9\u6545\u969c\u3002\u53ef\u4ee5\u8003\u8651&#xff1a;<\/p>\n<ul>\n<li>\u8054\u90a6\u96c6\u7fa4&#xff08;Federation&#xff09;&#xff1a; \u8bbe\u7f6e\u4e00\u4e2a\u4e2d\u5fc3\u7684Prometheus&#xff0c;\u4ece\u591a\u4e2a\u4e0b\u6e38Prometheus\u670d\u52a1\u5668\u805a\u5408\u6570\u636e\u3002<\/li>\n<li>\u4f7f\u7528Thanos\u6216Cortex&#xff1a; \u8fd9\u4e9b\u9879\u76ee\u4e3aPrometheus\u63d0\u4f9b\u4e86\u5168\u5c40\u89c6\u56fe\u3001\u957f\u671f\u5b58\u50a8\u548c\u65e0\u7f1d\u9ad8\u53ef\u7528\u80fd\u529b&#xff0c;\u4f46\u67b6\u6784\u590d\u6742\u5ea6\u663e\u8457\u589e\u52a0\u3002<\/li>\n<\/ul>\n<p>4. \u63a2\u7d22\u66f4\u591aExporter&#xff1a;<br \/>\nnode_exporter \u53ea\u662f\u51b0\u5c71\u4e00\u89d2\u3002Prometheus\u751f\u6001\u6709\u6d77\u91cf\u7684Exporter&#xff0c;\u51e0\u4e4e\u53ef\u4ee5\u76d1\u63a7\u4e00\u5207&#xff1a;<\/p>\n<ul>\n<li>mysqld_exporter \/ postgres_exporter&#xff1a; \u6570\u636e\u5e93\u76d1\u63a7<\/li>\n<li>nginx-vts-exporter \/ haproxy_exporter&#xff1a; Web\u670d\u52a1\/\u4ee3\u7406\u76d1\u63a7<\/li>\n<li>blackbox_exporter&#xff1a; \u7f51\u7edc\u63a2\u6d4b&#xff08;HTTP\u3001TCP\u3001ICMP\u7b49&#xff09;&#xff0c;\u7528\u4e8e\u76d1\u63a7\u670d\u52a1\u5916\u90e8\u53ef\u7528\u6027\u3002<\/li>\n<li>cadvisor&#xff1a; \u5bb9\u5668\u76d1\u63a7&#xff08;\u4e0eDocker\/Kubernetes\u96c6\u6210\u6781\u4f73&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u90e8\u7f72\u8fd9\u4e9bexporter\u7684\u6d41\u7a0b\u4e0enode_exporter\u7c7b\u4f3c&#xff1a;\u4e0b\u8f7d\u3001\u914d\u7f6e\u3001\u8fd0\u884c\u4e3a\u670d\u52a1&#xff0c;\u7136\u540e\u5728Prometheus\u914d\u7f6e\u4e2d\u6dfb\u52a0\u65b0\u7684\u6293\u53d6\u4efb\u52a1\u3002<\/p>\n<p>5. \u6027\u80fd\u8c03\u4f18&#xff1a;<br \/>\n\u5982\u679c\u76d1\u63a7\u76ee\u6807\u975e\u5e38\u591a&#xff08;\u6570\u767e\u4e0a\u5343&#xff09;&#xff0c;Prometheus\u7684\u6293\u53d6\u548c\u5b58\u50a8\u53ef\u80fd\u4f1a\u6210\u4e3a\u74f6\u9888\u3002\u53ef\u4ee5&#xff1a;<\/p>\n<ul>\n<li>\u8c03\u6574 scrape_interval&#xff0c;\u5bf9\u4e8e\u4e0d\u5e38\u53d8\u5316\u7684\u6307\u6807\u53ef\u4ee5\u9002\u5f53\u62c9\u957f\u95f4\u9694\u3002<\/li>\n<li>\u4f7f\u7528 Prometheus Recording Rules&#xff0c;\u5c06\u9891\u7e41\u67e5\u8be2\u6216\u8ba1\u7b97\u590d\u6742\u7684\u8868\u8fbe\u5f0f\u9884\u5148\u8ba1\u7b97\u597d\u5e76\u5b58\u50a8\u4e3a\u65b0\u6307\u6807&#xff0c;\u6781\u5927\u51cf\u8f7b\u67e5\u8be2\u65f6\u8d1f\u8f7d\u3002<\/li>\n<li>\u786e\u4fddPrometheus\u670d\u52a1\u5668\u6709\u8db3\u591f\u7684CPU\u3001\u5185\u5b58&#xff0c;\u5c24\u5176\u662f\u9ad8\u901f\u7684IOPS&#xff08;\u5bf9\u4e8e\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u5e93&#xff0c;\u78c1\u76d8IO\u6027\u80fd\u81f3\u5173\u91cd\u8981&#xff0c;SSD\u662f\u6807\u914d&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u642d\u5efa\u8fd9\u5957\u7cfb\u7edf\u7684\u8fc7\u7a0b&#xff0c;\u5176\u5b9e\u4e5f\u662f\u7406\u89e3\u73b0\u4ee3\u53ef\u89c2\u6d4b\u6027\u7406\u5ff5\u7684\u8fc7\u7a0b\u3002\u4ece\u6700\u521d\u7684\u624b\u5fd9\u811a\u4e71\u5230\u770b\u7740\u4eea\u8868\u76d8\u4e0a\u6240\u6709\u6307\u6807\u5e73\u7a33\u8fd0\u884c&#xff0c;\u90a3\u79cd\u5bf9\u57fa\u7840\u8bbe\u65bd\u7684\u638c\u63a7\u611f\u662f\u975e\u5e38\u5b9e\u5728\u7684\u3002\u6211\u81ea\u5df1\u7684\u51e0\u53f0\u670d\u52a1\u5668\u5728\u63a5\u5165\u76d1\u63a7\u540e&#xff0c;\u6210\u529f\u9884\u8b66\u4e86\u4e24\u6b21\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\u548c\u4e00\u6b21\u5185\u5b58\u5f02\u5e38\u589e\u957f&#xff0c;\u907f\u514d\u4e86\u670d\u52a1\u4e2d\u65ad\u3002\u73b0\u5728&#xff0c;\u4efb\u4f55\u98ce\u5439\u8349\u52a8\u90fd\u5c3d\u5728\u638c\u63e1&#xff0c;\u518d\u4e5f\u4e0d\u7528\u534a\u591c\u88ab\u62a5\u8b66\u7535\u8bdd\u5435\u9192\u624d\u53d1\u73b0\u95ee\u9898\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece\u96f6\u6784\u5efa\u4f60\u7684\u670d\u52a1\u5668\u76d1\u63a7\u4e2d\u67a2&#xff1a;Ubuntu 22.04\u4e0aPrometheus\u4e0eGrafana\u7684\u5b9e\u6218\u90e8\u7f72\u4e0e\u6df1\u5ea6\u8c03\u4f18<br \/>\n\u6700\u8fd1\u5728\u6574\u7406\u81ea\u5df1\u7684\u5f00\u53d1\u73af\u5883&#xff0c;\u53d1\u73b0\u624b\u5934\u7684\u51e0\u53f0\u4e91\u670d\u52a1\u5668\u548c\u672c\u5730\u865a\u62df\u673a\u72b6\u6001\u8d8a\u6765\u8d8a\u96be\u638c\u63e1\u3002CPU\u4f7f\u7528\u7387\u662f\u4e0d\u662f\u53c8\u5077\u5077\u8dd1\u6ee1\u4e86&#xff1f;\u5185\u5b58\u6cc4\u6f0f\u7684\u8fdb\u7a0b\u85cf\u5728\u54ea\u91cc&#xff1f;\u78c1\u76d8\u7a7a\u95f4\u8fd8\u5269\u591a\u5c11&#xff1f;\u6bcf\u6b21\u90fd\u8981\u4e00\u53f0\u53f0SSH\u767b\u5f55\u4e0a\u53bb\u6572\u547d\u4ee4&#xff0c;\u6548\u7387\u4f4e\u4e0b\u4e0d\u8bf4&#xff0c;\u8fd8\u5bb9\u6613\u9057\u6f0f\u5173\u952e\u544a\u8b66\u3002\u5bf9\u4e8e\u5c0f\u578b\u56e2\u961f\u6216\u4e2a\u4eba\u5f00\u53d1\u8005\u800c\u8a00&#xff0c;\u4e00\u5957<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1647,678,103,3927],"topic":[],"class_list":["post-78753","post","type-post","status-publish","format-standard","hentry","category-server","tag-grafana","tag-prometheus","tag-ubuntu","tag-3927"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ubuntu 22.04\u4e0bPrometheus+Grafana\u76d1\u63a7\u591a\u53f0\u670d\u52a1\u5668\u7684\u4fdd\u59c6\u7ea7\u6559\u7a0b\uff08\u542b\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/78753.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ubuntu 22.04\u4e0bPrometheus+Grafana\u76d1\u63a7\u591a\u53f0\u670d\u52a1\u5668\u7684\u4fdd\u59c6\u7ea7\u6559\u7a0b\uff08\u542b\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4ece\u96f6\u6784\u5efa\u4f60\u7684\u670d\u52a1\u5668\u76d1\u63a7\u4e2d\u67a2&#xff1a;Ubuntu 22.04\u4e0aPrometheus\u4e0eGrafana\u7684\u5b9e\u6218\u90e8\u7f72\u4e0e\u6df1\u5ea6\u8c03\u4f18 \u6700\u8fd1\u5728\u6574\u7406\u81ea\u5df1\u7684\u5f00\u53d1\u73af\u5883&#xff0c;\u53d1\u73b0\u624b\u5934\u7684\u51e0\u53f0\u4e91\u670d\u52a1\u5668\u548c\u672c\u5730\u865a\u62df\u673a\u72b6\u6001\u8d8a\u6765\u8d8a\u96be\u638c\u63e1\u3002CPU\u4f7f\u7528\u7387\u662f\u4e0d\u662f\u53c8\u5077\u5077\u8dd1\u6ee1\u4e86&#xff1f;\u5185\u5b58\u6cc4\u6f0f\u7684\u8fdb\u7a0b\u85cf\u5728\u54ea\u91cc&#xff1f;\u78c1\u76d8\u7a7a\u95f4\u8fd8\u5269\u591a\u5c11&#xff1f;\u6bcf\u6b21\u90fd\u8981\u4e00\u53f0\u53f0SSH\u767b\u5f55\u4e0a\u53bb\u6572\u547d\u4ee4&#xff0c;\u6548\u7387\u4f4e\u4e0b\u4e0d\u8bf4&#xff0c;\u8fd8\u5bb9\u6613\u9057\u6f0f\u5173\u952e\u544a\u8b66\u3002\u5bf9\u4e8e\u5c0f\u578b\u56e2\u961f\u6216\u4e2a\u4eba\u5f00\u53d1\u8005\u800c\u8a00&#xff0c;\u4e00\u5957\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/78753.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-27T20:41:04+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/78753.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/78753.html\",\"name\":\"Ubuntu 22.04\u4e0bPrometheus+Grafana\u76d1\u63a7\u591a\u53f0\u670d\u52a1\u5668\u7684\u4fdd\u59c6\u7ea7\u6559\u7a0b\uff08\u542b\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-27T20:41:04+00:00\",\"dateModified\":\"2026-02-27T20:41:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/78753.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/78753.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/78753.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ubuntu 22.04\u4e0bPrometheus+Grafana\u76d1\u63a7\u591a\u53f0\u670d\u52a1\u5668\u7684\u4fdd\u59c6\u7ea7\u6559\u7a0b\uff08\u542b\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ubuntu 22.04\u4e0bPrometheus+Grafana\u76d1\u63a7\u591a\u53f0\u670d\u52a1\u5668\u7684\u4fdd\u59c6\u7ea7\u6559\u7a0b\uff08\u542b\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/78753.html","og_locale":"zh_CN","og_type":"article","og_title":"Ubuntu 22.04\u4e0bPrometheus+Grafana\u76d1\u63a7\u591a\u53f0\u670d\u52a1\u5668\u7684\u4fdd\u59c6\u7ea7\u6559\u7a0b\uff08\u542b\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4ece\u96f6\u6784\u5efa\u4f60\u7684\u670d\u52a1\u5668\u76d1\u63a7\u4e2d\u67a2&#xff1a;Ubuntu 22.04\u4e0aPrometheus\u4e0eGrafana\u7684\u5b9e\u6218\u90e8\u7f72\u4e0e\u6df1\u5ea6\u8c03\u4f18 \u6700\u8fd1\u5728\u6574\u7406\u81ea\u5df1\u7684\u5f00\u53d1\u73af\u5883&#xff0c;\u53d1\u73b0\u624b\u5934\u7684\u51e0\u53f0\u4e91\u670d\u52a1\u5668\u548c\u672c\u5730\u865a\u62df\u673a\u72b6\u6001\u8d8a\u6765\u8d8a\u96be\u638c\u63e1\u3002CPU\u4f7f\u7528\u7387\u662f\u4e0d\u662f\u53c8\u5077\u5077\u8dd1\u6ee1\u4e86&#xff1f;\u5185\u5b58\u6cc4\u6f0f\u7684\u8fdb\u7a0b\u85cf\u5728\u54ea\u91cc&#xff1f;\u78c1\u76d8\u7a7a\u95f4\u8fd8\u5269\u591a\u5c11&#xff1f;\u6bcf\u6b21\u90fd\u8981\u4e00\u53f0\u53f0SSH\u767b\u5f55\u4e0a\u53bb\u6572\u547d\u4ee4&#xff0c;\u6548\u7387\u4f4e\u4e0b\u4e0d\u8bf4&#xff0c;\u8fd8\u5bb9\u6613\u9057\u6f0f\u5173\u952e\u544a\u8b66\u3002\u5bf9\u4e8e\u5c0f\u578b\u56e2\u961f\u6216\u4e2a\u4eba\u5f00\u53d1\u8005\u800c\u8a00&#xff0c;\u4e00\u5957","og_url":"https:\/\/www.wsisp.com\/helps\/78753.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-27T20:41:04+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/78753.html","url":"https:\/\/www.wsisp.com\/helps\/78753.html","name":"Ubuntu 22.04\u4e0bPrometheus+Grafana\u76d1\u63a7\u591a\u53f0\u670d\u52a1\u5668\u7684\u4fdd\u59c6\u7ea7\u6559\u7a0b\uff08\u542b\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-27T20:41:04+00:00","dateModified":"2026-02-27T20:41:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/78753.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/78753.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/78753.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Ubuntu 22.04\u4e0bPrometheus+Grafana\u76d1\u63a7\u591a\u53f0\u670d\u52a1\u5668\u7684\u4fdd\u59c6\u7ea7\u6559\u7a0b\uff08\u542b\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/78753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=78753"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/78753\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=78753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=78753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=78753"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=78753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}