{"id":1554,"date":"2023-03-25T15:40:06","date_gmt":"2023-03-25T07:40:06","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1554"},"modified":"2023-04-27T21:37:40","modified_gmt":"2023-04-27T13:37:40","slug":"prometheus-grafana-using-node-exporter-monitoring-hosts","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/prometheus-grafana-using-node-exporter-monitoring-hosts\/","title":{"rendered":"Prometheus + Grafana \u4f7f\u7528 Node Exporter \u76d1\u63a7\u4e3b\u673a"},"content":{"rendered":"<p>\u53c2\u8003\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/songjiayang.gitbooks.io\/prometheus\/content\/exporter\/nodeexporter.html\">https:\/\/songjiayang.gitbooks.io\/prometheus\/content\/exporter\/nodeexporter.html<\/a><br \/>\n\u5b98\u65b9\u4e0b\u8f7d\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/prometheus.io\/download\/\">https:\/\/prometheus.io\/download\/<\/a><br \/>\nGrafana Dashboard\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/grafana.com\/grafana\/dashboards\/8919\">https:\/\/grafana.com\/grafana\/dashboards\/8919<\/a><\/p>\n<h2>Node Exporter\u90e8\u7f72<\/h2>\n<p><!-- more --><\/p>\n<pre><code># tar -zxf node_exporter-0.18.1.linux-amd64.tar.gz -C \/usr\/local\/\n# mv \/usr\/local\/node_exporter-0.18.1.linux-amd64 \/usr\/local\/node_exporter\n# cd \/usr\/local\/node_exporter\/\n# nohup .\/node_exporter &amp;\n# firewall-cmd --permanent --add-port=9100\/tcp\n# firewall-cmd --reload<\/code><\/pre>\n<h2>Prometheus\u914d\u7f6e<\/h2>\n<pre><code class=\"language-yml\">- job_name: linux\n  static_configs:\n    - targets: [&#039;192.168.16.80:9100&#039;]\n      labels:\n        instance: node-80\n        group: inner\n    - targets: [&#039;192.168.16.82:9100&#039;]\n      labels:\n        instance: node-82\n        group: inner\n    - targets: [&#039;192.168.16.86:9100&#039;]\n      labels:\n        instance: node-86\n        group: inner\n    - targets: [&#039;192.168.16.87:9100&#039;]\n      labels:\n        instance: node-87\n        group: inner\n    - targets: [&#039;192.168.16.88:9100&#039;]\n      labels:\n        instance: node-88\n        group: inner<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\uff1ahttps:\/\/songjiayang.gitbooks.io\/prometheus\/content\/e [&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,387],"class_list":["post-1554","post","type-post","status-publish","format-standard","hentry","category-monitor","tag-grafana","tag-prometheus"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1554","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=1554"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1554\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}