{"id":964,"date":"2014-09-01T18:21:00","date_gmt":"2014-09-01T10:21:00","guid":{"rendered":"http:\/\/www.yeetrack.com\/?p=964"},"modified":"2014-09-01T18:21:00","modified_gmt":"2014-09-01T10:21:00","slug":"linux%e7%9b%91%e6%8e%a7%e5%b7%a5%e5%85%b7munin%e7%9a%84%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.yeetrack.com\/?p=964","title":{"rendered":"Linux\u76d1\u63a7\u5de5\u5177munin\u7684\u5b89\u88c5\u548c\u914d\u7f6e"},"content":{"rendered":"<h3 class=\"p0\" style=\"font-weight: bold; color: #000000;\"><strong><span style=\"color: #008000;\">\u3007\u3001\u6458\u8981<\/span><\/strong><\/h3>\n<p class=\"p0\" style=\"color: #000000;\">munin\u662f\u7528\u4e8eLinux\u7cfb\u7edf\uff08\u4e5f\u53ef\u4ee5\u76d1\u63a7windows\u7cfb\u7edf\uff09\u7684\u76d1\u63a7\u8f6f\u4ef6\u3002munin\u9664\u4e86\u53ef\u4ee5\u76d1\u63a7\u7cfb\u7edf\u7684\u5404\u9879\u6570\u503c\u4e4b\u5916\uff0c\u6700\u5927\u7684\u597d\u5904\u662f\u53ef\u4ee5\u81ea\u5df1\u7f16\u5199\u63d2\u4ef6\u81ea\u5b9a\u4e49\u76d1\u63a7\u9700\u8981\u7684\u6570\u503c\u3002\u6574\u4e2a\u7cfb\u7edf\u7684\u67b6\u6784\u7b80\u5355\u660e\u4e86\uff0c\u64cd\u4f5c\u65b9\u4fbf\u3002\u5982\u679c\u662f\u4f7f\u7528Debian\u6216\u8005Ubuntu\u5b89\u88c5\uff0c\u5b89\u88c5\u8fc7\u7a0b\u4e5f\u975e\u5e38\u7b80\u5355\u3002munin\u9664\u4e86\u53ef\u4ee5\u76d1\u63a7\u7ed3\u679c\uff0c\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u62a5\u8b66\u3002\u5bf9\u4e8e\u6211\u4e2a\u4eba\u5bf9\u6027\u80fd\u6d4b\u8bd5\u7684\u5de5\u4f5c\u6765\u8bf4\uff0c\u662f\u4e2a\u975e\u5e38\u597d\u7684\u5de5\u5177\u3002<!--more--><\/p>\n<p class=\"p0\" style=\"color: #000000;\"><strong>1.\u00a0\u5185\u5bb9<\/strong><\/p>\n<p class=\"p0\" style=\"color: #000000;\">munin\u6574\u4e2a\u4f7f\u7528\u4e0b\u6765\uff0c\u7bc7\u5e45\u4f1a\u6709\u70b9\u5927\uff0c\u5305\u62ec\u5c55\u793a\u3001\u81ea\u5b9a\u4e49\u63d2\u4ef6\u3002\u8fd9\u8fb9\u5206\u6210\u4e09\u4e2a\u90e8\u5206\u6765\u8bf4\u660e\u3002\u672c\u6b21\u53ea\u8bb2\u5b89\u88c5\u548c\u914d\u7f6e\u3002<\/p>\n<ul style=\"color: #000000;\">\n<li>\n<ul>\n<li>munin\u00a0master\u548cmunin-node\u7684\u5b89\u88c5\uff1b<\/li>\n<li>web\u670d\u52a1\u5c55\u793a\u7ed3\u679c\u548c\u52a8\u6001\u67e5\u770b\u7ed3\u679c\uff1b<\/li>\n<li>\u63d2\u4ef6\u7f16\u5199\u4e0e\u914d\u7f6e\uff08mysql\u63d2\u4ef6\u4e0e\u81ea\u5b9a\u4e49\u63d2\u4ef6\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"p0\" style=\"color: #000000;\"><strong>2.\u00a0\u67b6\u6784\u793a\u610f\u56fe<\/strong><\/p>\n<p class=\"p0\" style=\"color: #000000;\"><img decoding=\"async\" src=\"http:\/\/images.cnitblog.com\/i\/211061\/201405\/282001539004930.png\" alt=\"\" \/><\/p>\n<p class=\"p0\" style=\"color: #000000;\">munin\u7684\u67b6\u6784\u975e\u5e38\u7b80\u5355\u3002\u5305\u542b\u4e00\u4e2a\u670d\u52a1\u7aefmunin\u548c\u4e00\u4e2a\u5ba2\u6237\u7aefmunin-node\u3002munin-node\u53ef\u4ee5\u90e8\u7f72\u5728\u591a\u53f0\u673a\u5668\u4e0a\u9762\uff0cmunin\u7528\u4e8e\u5b9a\u65f6\u5411\u4e00\u53f0\u6216\u8005\u591a\u53f0\u673a\u5668\u6536\u96c6\u76d1\u63a7\u7684\u4fe1\u606f\u3002munin\u6536\u96c6\u5230\u6570\u636e\u540e\u4f1a\u751f\u6210\u9759\u6001\u7684html\u6587\u4ef6\u3002\u4e3a\u4e86\u5c55\u793a\u76d1\u63a7\u7684\u7ed3\u679c\uff0c\u9700\u8981\u4e00\u4e2aweb\u670d\u52a1\u5668\u3002\u6709\u4e86web\u4e5f\u53ef\u4ee5\u968f\u65f6\u968f\u5730\u8bbf\u95ee\u76d1\u63a7\u7ed3\u679c\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<h3 class=\"p0\" style=\"font-weight: bold; color: #000000;\"><strong><span style=\"color: #008000;\">\u4e00\u3001Ubuntu\/Debian\u00a0\u4e0b\u5b89\u88c5<\/span><\/strong><\/h3>\n<p class=\"p0\" style=\"color: #000000;\">\u5728Ubuntu\/Debian\u4e0b\u5b89\u88c5\u975e\u5e38\u7b80\u5355\u3002\u4f7f\u7528apt-get\u5c31\u53ef\u4ee5\u76f4\u63a5\u5b89\u88c5\u597d\u4e86\u3002\u5b89\u88c5\u5b8c\u4e86\u4e4b\u540e\uff0cMunin\u548cMunin-node\u4f1a\u987a\u4fbf\u542f\u52a8\u7684\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\"><strong>1.\u00a0Munin\u00a0node\uff08\u5ba2\u6237\u7aef\uff09<\/strong><\/p>\n<p class=\"p0\" style=\"color: #000000;\">#\u00a0apt-get\u00a0install\u00a0munin-node<\/p>\n<p class=\"p0\" style=\"color: #000000;\"><strong>2.\u00a0Munin\u00a0master\uff08\u670d\u52a1\u7aef\uff09<\/strong><\/p>\n<p class=\"p0\" style=\"color: #000000;\">#\u00a0apt-get\u00a0install\u00a0munin<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<h3 class=\"p0\" style=\"font-weight: bold; color: #000000;\"><strong><span style=\"color: #008000;\">\u4e8c\u3001Redhat\u4e0b\u5b89\u88c5<\/span><\/strong><\/h3>\n<p class=\"p0\" style=\"color: #000000;\">\u5728\u7ea2\u5e3d\u4e0b\u5b89\u88c5\u5c31\u7565\u663e\u9ebb\u70e6\u4e86\u3002\u9996\u5148\u8981\u628arpm\u7684\u8f6f\u4ef6\u5305\u4e0b\u8f7d\u4e0b\u6765\u3002\u4f46\u662f\u9664\u4e86Munin\u548cMunin-node\u7684\u8f6f\u4ef6\u5305\uff0c\u53e6\u5916\u8fd8\u6d89\u53ca\u5230perl\u7684\u4e00\u4e9b\u5e93\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u53e6\u5916\uff0cRedhat\u4e0b\u5b89\u88c5\uff0c\u4e0d\u540c\u7248\u672c\u7684\u7cfb\u7edf\u5305\uff0c\u4f7f\u7528\u7684\u8f6f\u4ef6\u5305\u8fd8\u4e0d\u4e00\u6837\u3002\u6211\u4eec\u4f7f\u7528\u7684\u662fRHEL5\u7248\u672c\u7684\uff0c\u6240\u4ee5\u4e0b\u9762\u4f8b\u5b50\u4ee5RHEL5\u4e3a\u51c6\uff08\u5b98\u65b9\u7ed9\u7684\u8d44\u6599\u5728RHEL5\u4e0b\u5b89\u88c5\u4e0eRHEL4\u4e0b\u5b89\u88c5\u7684\u8fc7\u7a0b\u662f\u4e00\u6837\u7684\u3002\u53ea\u662f\u6bcf\u4e2a\u53ef\u80fd\u8f6f\u4ef6\u5305\u6839\u636e\u7cfb\u7edf\u800c\u4e0d\u4e00\u6837\u800c\u5df2\u3002\u8fd9\u4e2a\u76f4\u63a5\u66ff\u6362\u6389\u6700\u540e\u7684rpm\u4e3a\u6700\u65b0\u7684\u7248\u672c\u53f7\u5c31\u597d\u4e86\uff09\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\"><strong>1.\u00a0Munin\u00a0node\uff08\u5ba2\u6237\u7aef\uff09<\/strong><\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u4e0b\u8f7d\u7a0b\u5e8f\u5305\uff1a<\/p>\n<p class=\"p0\" style=\"color: #000000;\">Munin-node\u5305\uff1a<br \/>\n#\u00a0wget\u00a0http:\/\/dl.fedoraproject.org\/pub\/epel\/5\/i386\/munin-node-2.0.20-1.el5.noarch.rpm<\/p>\n<p>\u4e0b\u8f7d\u4f9d\u8d56\u5305\uff1a<br \/>\n#\u00a0wget\u00a0ftp:\/\/195.220.108.108\/linux\/centos\/5.10\/os\/x86_64\/CentOS\/sysstat-7.0.2-12.el5.x86_64.rpm<br \/>\n#\u00a0wget\u00a0http:\/\/dag.wieers.com\/rpm\/packages\/perl-Net-SNMP\/perl-Net-SNMP-5.2.0-1.2.el5.rf.noarch.rpm<br \/>\n#\u00a0wget\u00a0http:\/\/dag.wieers.com\/rpm\/packages\/perl-Crypt-DES\/perl-Crypt-DES-2.05-3.2.el5.rf.i386.rpm\u00a0\uff08perl-Net-SNMP\u4f9d\u8d56\u6b64\u5305\uff09<br \/>\n#\u00a0wget\u00a0http:\/\/pkgs.repoforge.org\/perl-Socket6\/perl-Socket6-0.23-1.el5.rfx.x86_64.rpm\u00a0\uff08perl-Net-SNMP\u4f9d\u8d56\u6b64\u5305\uff09<br \/>\n#\u00a0wget\u00a0http:\/\/pkgs.repoforge.org\/perl-Net-Server\/perl-Net-Server-0.99-1.el5.rf.noarch.rpm<\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u987a\u5e8f\u5b89\u88c5\uff1a<br \/>\n#\u00a0rpm\u00a0-Uvh\u00a0sysstat-7.0.2-12.el5.x86_64.rpm<br \/>\n#\u00a0rpm\u00a0-Uvh\u00a0perl-Net-Server-0.99-1.el5.rf.noarch.rpm<br \/>\n#\u00a0rpm\u00a0-Uvh\u00a0perl-Socket6-0.23-1.el5.rfx.x86_64.rpm<br \/>\n#\u00a0rpm\u00a0-Uvh\u00a0perl-Crypt-DES-2.05-3.2.el5.rf.i386.rpm<br \/>\n#\u00a0rpm\u00a0-Uvh\u00a0perl-Net-SNMP-5.2.0-1.2.el5.rf.noarch.rpm<br \/>\n#\u00a0rpm\u00a0-Uvh\u00a0munin-node-1.2.5-1rhel4.noarch.rpm\uff08\u6700\u540e\u5b89\u88c5Munin\u00a0node\uff09<\/p>\n<p>\u5373\uff1a<br \/>\n1:sysstat<br \/>\n2:perl-Socket6<br \/>\n3:perl-Crypt-DES<br \/>\n4:perl-Net-SNMP<br \/>\n5:perl-Net-Server<br \/>\n6:munin-node<\/p>\n<p>\u5982\u679c\u9047\u5230\u7b7e\u540d\u9a8c\u8bc1\u4e0d\u901a\u8fc7\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u52a0\u4e0a[--force\u00a0--nodeps]\u00a0\u53c2\u6570\u5f3a\u5236\u5b89\u88c5\uff1a<br \/>\n#\u00a0rpm\u00a0-Uvh\u00a0perl-Net-SNMP-5.2.0-1.2.el5.rf.noarch.rpm\u00a0--force\u00a0--nodeps<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\">\u00a0\u4ee5\u4e0a\u987a\u5229\u7684\u8bdd\uff0cmunin-node\u5c31\u5b89\u88c5\u597d\u4e86\u3002\u5b89\u88c5\u5b8c\u6bd5\u540e\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u542f\u52a8munin-node\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\"><strong>2.\u00a0Munin\u00a0master\uff08\u670d\u52a1\u7aef\uff09<\/strong><\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u4e0b\u8f7dMunin\u5305\uff1a<\/p>\n<p class=\"p0\" style=\"color: #000000;\">#\u00a0wget\u00a0http:\/\/dl.fedoraproject.org\/pub\/epel\/5\/i386\/munin-2.0.20-1.el5.noarch.rpm<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\">\u4e0b\u8f7d\u4f9d\u8d56\u5305\uff1a<\/p>\n<p class=\"p0\" style=\"color: #000000;\">#\u00a0wget\u00a0http:\/\/dag.wieers.com\/rpm\/packages\/perl-HTML-Template\/perl-HTML-Template-2.8-1.2.el5.rf.noarch.rpm<\/p>\n<p class=\"p0\" style=\"color: #000000;\">#\u00a0wget\u00a0http:\/\/pkgs.repoforge.org\/rrdtool\/perl-rrdtool-1.4.7-1.el6.rfx.x86_64.rpm<\/p>\n<p class=\"p0\" style=\"color: #000000;\">#\u00a0wget\u00a0http:\/\/pkgs.repoforge.org\/rrdtool\/tcl-rrdtool-1.4.7-1.el5.rf.x86_64.rpm<\/p>\n<p class=\"p0\" style=\"color: #000000;\">#\u00a0wget\u00a0http:\/\/dag.wieers.com\/rpm\/packages\/perl-Net-SNMP\/perl-Net-SNMP-5.2.0-1.2.el5.rf.noarch.rpm\uff08munin\u00a0node\u4e5f\u7528\u5230\uff09<\/p>\n<p class=\"p0\" style=\"color: #000000;\">#\u00a0wget\u00a0http:\/\/dag.wieers.com\/rpm\/packages\/perl-Net-Server\/perl-Net-Server-0.99-1.el5.rf.noarch.rpm\uff08munin\u00a0node\u4e5f\u7528\u5230\uff09<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\">\u5b89\u88c5\u987a\u5e8f\uff1a<\/p>\n<p class=\"p0\" style=\"color: #000000;\">1:perl-HTML-Template<\/p>\n<p class=\"p0\" style=\"color: #000000;\">2:rrdtool<\/p>\n<p class=\"p0\" style=\"color: #000000;\">3:perl-rrdtool<\/p>\n<p class=\"p0\" style=\"color: #000000;\">4:perl-Net-SNMP<\/p>\n<p class=\"p0\" style=\"color: #000000;\">5:perl-Net-Server<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u00a06:munin<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\">\u4ee5\u4e0a\uff0cmunin\u7684\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u7aef\u90fd\u5b89\u88c5\u597d\u4e86\u3002\u5982\u679c\u5b89\u88c5\u671f\u95f4\u9047\u5230\u7248\u672c\u4e0d\u5bf9\u7684\u5730\u65b9\uff0c\u8bf7\u6839\u636e\u81ea\u5df1\u7684\u7cfb\u7edf\u7248\u672c\uff0c\u81ea\u884c\u66ff\u6362\u4e3a\u76f8\u5e94\u7684\u4f9d\u8d56\u5305\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<h3 class=\"p0\" style=\"font-weight: bold; color: #000000;\"><strong><span style=\"color: #008000;\">\u4e09\u3001\u914d\u7f6e\u548c\u542f\u52a8<\/span><\/strong><\/h3>\n<p class=\"p0\" style=\"color: #000000;\">\u65e0\u8bba\u662fDebian\u4e0b\u5b89\u88c5\uff0c\u8fd8\u662fRedHat\u4e0b\u5b89\u88c5\uff0cmunin-node\u548cmunin\u00a0master\uff08\u5373munin\uff09\u90fd\u9ed8\u8ba4\u5b89\u88c5\u5728\u8def\u5f84\/etc\/munin\u4e0b\u3002\u914d\u7f6e\u6587\u4ef6\u4e0e\u63d2\u4ef6\u90fd\u662f\u5728\u8fd9\u91cc\u914d\u7f6e\u7684\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\"><strong>1.\u00a0munin-node.conf\uff08\u5ba2\u6237\u7aef\u914d\u7f6e\uff09<\/strong><\/p>\n<p class=\"p0\" style=\"color: #000000;\">1.1\u00a0\u914d\u7f6e\u6587\u4ef6<\/p>\n<p class=\"p0\" style=\"color: #000000;\">munin-node.conf\u662f\u5ba2\u6237\u7aef\uff08\u5373munin-node\uff09\u7684\u914d\u7f6e\u6587\u4ef6\u3002\u8fd9\u8fb9\u7684\u914d\u7f6e\u6bd4\u8f83\u7b80\u5355\uff0c\u53ea\u9700\u8981\u914d\u7f6e\u670d\u52a1\u5668\u7684IP\u5730\u5740\u5c31\u53ef\u4ee5\u4e86\u3002\u5728allow\u65b0\u589e\u4e00\u4e2a\u670d\u52a1\u5668\u7684IP\u914d\u7f6e\u3002\u9ed8\u8ba4\u662f\u914d\u7f6e\u4e86\u672c\u673a\u4e86\uff0c\u5982\u679c\u4f60\u7684munin-node\u4e0emunin\u00a0master\u662f\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u9762\uff0c\u9ed8\u8ba4\u5c31\u53ef\u4ee5\u4e86\u3002\u8fd9\u4e2a\u914d\u7f6e\u662f\u7528\u6765\u9650\u5236\u90a3\u4e9bIP\u53ef\u4ee5\u8bbf\u95ee\u7684\u3002<\/p>\n<div class=\"cnblogs_code\" style=\"color: #000000;\">\n<pre>allow ^<span style=\"color: #800080;\">127<\/span>\\.<span style=\"color: #800080;\">0<\/span>\\.<span style=\"color: #800080;\">0<\/span>\\.<span style=\"color: #800080;\">1<\/span><span style=\"color: #000000;\">$\nallow <\/span>^::<span style=\"color: #800080;\">1<\/span><span style=\"color: #000000;\">$\nallow <\/span>^<span style=\"color: #800080;\">192<\/span>\\.<span style=\"color: #800080;\">168<\/span>\\.<span style=\"color: #800080;\">1<\/span>\\.<span style=\"color: #800080;\">2<\/span>$<\/pre>\n<\/div>\n<p class=\"p0\" style=\"color: #000000;\">\u53e6\u5916\u8fd8\u53ef\u4ee5\u4fee\u6539\u7aef\u53e3\u3001\u7ed1\u5b9aIP\u5730\u5740\u7b49\u3002\u90fd\u6bd4\u8f83\u7b80\u5355\uff0c\u5c31\u4e0d\u591a\u8bf4\u4e86\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\">1.2\u00a0\u542f\u52a8\u3001\u505c\u6b62\u548c\u91cd\u542f<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u542f\u52a8\u7a0b\u5e8f\u662f\/etc\/init.d\/\u4e0b\u7684munin-node\u53ef\u6267\u884c\u6587\u4ef6\u3002\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4ee5\u670d\u52a1\u7684\u5f62\u5f0f\u542f\u52a8\u3002<\/p>\n<div class=\"cnblogs_code\" style=\"color: #000000;\">\n<pre># service munin-<span style=\"color: #000000;\">node start        #\u542f\u52a8\n# service munin<\/span>-<span style=\"color: #000000;\">node stop        #\u505c\u6b62\n# service munin<\/span>-node restart     #\u91cd\u542f<\/pre>\n<\/div>\n<p style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\">1.3\u00a0\u6d4b\u8bd5<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u76f4\u63a5telnet\u5c31\u53ef\u4ee5\u3002\u7aef\u53e3\u9ed8\u8ba4\u662f\u914d\u7f6e\u4e3a4949\u7684\uff0c\u90a3\u4e48telnet\u8fde\u63a5\uff0c\u8f93\u5165help\u53ef\u4ee5\u67e5\u770b\u76d1\u63a7\u547d\u4ee4\u3002<\/p>\n<div class=\"cnblogs_code\" style=\"color: #000000;\">\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a style=\"color: #0066aa;\" title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<pre>$ telnet <span style=\"color: #800080;\">127.0<\/span>.<span style=\"color: #800080;\">0.1<\/span> <span style=\"color: #800080;\">4949<\/span><span style=\"color: #000000;\">\nTrying <\/span><span style=\"color: #800080;\">127.0<\/span>.<span style=\"color: #800080;\">0.1<\/span><span style=\"color: #000000;\">...\nConnected to <\/span><span style=\"color: #800080;\">127.0<\/span>.<span style=\"color: #800080;\">0.1<\/span><span style=\"color: #000000;\">.\nEscape character is <\/span><span style=\"color: #800000;\">'<\/span><span style=\"color: #800000;\">^]<\/span><span style=\"color: #800000;\">'<\/span><span style=\"color: #000000;\">.\n# munin node at machinename\nhelp\n# Unknown command. Try cap, list, nodes, config, fetch, version or quit<\/span><\/pre>\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a style=\"color: #0066aa;\" title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<\/div>\n<p style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\"><strong>2.\u00a0munin.conf<\/strong><\/p>\n<p class=\"p0\" style=\"color: #000000;\">2.1\u00a0\u914d\u7f6e<\/p>\n<p class=\"p0\" style=\"color: #000000;\">munin.conf\u662f\u670d\u52a1\u7aef\uff08\u5373munin\u00a0master\uff09\u7684\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u9996\u5148\u53bb\u6389\u4e00\u4e0b\u8def\u5f84\u914d\u7f6e\u7684\u6ce8\u91ca\u3002\u9664\u4e86tmpldir\uff0c\u5176\u5b83\u53ef\u81ea\u884c\u914d\u7f6e\u3002\u4f46\u662ftmpldir\u8981\u914d\u7f6e\u5230munin\u7684HTML\u6a21\u677f\u4e0a\uff0c\u9ed8\u8ba4\u662f\u5728\/etc\/munin\/templates\u00a0\u4e0b\u3002\u57fa\u672c\u4e0a\u90fd\u6709\u8bf4\u660e\uff0c\u8fd8\u662f\u6bd4\u8f83\u5bb9\u6613\u770b\u5f97\u61c2\u7684\u3002<\/p>\n<div class=\"cnblogs_code\" style=\"color: #000000;\">\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a style=\"color: #0066aa;\" title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<pre>dbdir   \/var\/lib\/<span style=\"color: #000000;\">munin\nhtmldir <\/span>\/var\/cache\/munin\/<span style=\"color: #000000;\">www\nlogdir <\/span>\/var\/log\/<span style=\"color: #000000;\">munin\nrundir  <\/span>\/var\/run\/<span style=\"color: #000000;\">munin\n\ntmpldir <\/span>\/etc\/munin\/templates<\/pre>\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a style=\"color: #0066aa;\" title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<\/div>\n<p style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\">\u7136\u540e\u627e\u5230localhost.localdomain\u8282\u70b9\u3002\u8fd9\u4e2a\u662f\u7528\u4e8e\u914d\u7f6e\u9700\u8981\u76d1\u63a7\u7684\u76ee\u6807\u673a\u5668\u7684\u3002\u9ed8\u8ba4\u4f1a\u914d\u7f6e\u672c\u673a127.0.0.1\u3002\u6839\u636e\u9700\u8981\uff0c\u53ef\u65b0\u589e\u9700\u8981\u76d1\u63a7\u7684\u673a\u5668\u3002\u53ef\u4ee5\u589e\u52a0\u591a\u53f0\u673a\u5668\uff0c\u53ea\u8981\u76ee\u6807\u673a\u5668\u5b89\u88c5\u4e86munin-node\u5c31\u53ef\u4ee5\u3002\u5982\uff1a<\/p>\n<div class=\"cnblogs_code\" style=\"color: #000000;\">\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a style=\"color: #0066aa;\" title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<pre><span style=\"color: #000000;\"># a simple host tree\n[local.<\/span><span style=\"color: #800080;\">127<\/span>-<span style=\"color: #800080;\">0<\/span>-<span style=\"color: #800080;\">0<\/span>-<span style=\"color: #800080;\">1<\/span><span style=\"color: #000000;\">]\n    address <\/span><span style=\"color: #800080;\">127.0<\/span>.<span style=\"color: #800080;\">0.1<\/span><span style=\"color: #000000;\">\n    use_node_name yes\n\n[mytest.<\/span><span style=\"color: #800080;\">192<\/span>-<span style=\"color: #800080;\">168<\/span>-<span style=\"color: #800080;\">1<\/span>-<span style=\"color: #800080;\">3<\/span><span style=\"color: #000000;\">]\n    address <\/span><span style=\"color: #800080;\">192.168<\/span>.<span style=\"color: #800080;\">1.3<\/span><span style=\"color: #000000;\">\n    use_node_name yes\n\n[mysql.<\/span><span style=\"color: #800080;\">192<\/span>-<span style=\"color: #800080;\">168<\/span>-<span style=\"color: #800080;\">1<\/span>-<span style=\"color: #800080;\">4<\/span><span style=\"color: #000000;\">]\n    address <\/span><span style=\"color: #800080;\">192.168<\/span>.<span style=\"color: #800080;\">1.4<\/span><span style=\"color: #000000;\">\n    use_node_name yes<\/span><\/pre>\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a style=\"color: #0066aa;\" title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<\/div>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\">2.2\u00a0\u542f\u52a8<\/p>\n<p class=\"p0\" style=\"color: #000000;\">munin\u00a0master\u5b89\u88c5\u6210\u529f\u540e\u3002\u4f1a\u7ed9\u7cfb\u7edf\u589e\u52a0\u4e00\u4e2amunin\u7528\u6237\u3002\u542f\u52a8\u670d\u52a1\u7aef\uff08munin\u00a0master\uff09\u662f\u65e0\u6cd5\u7528root\u6743\u9650\u542f\u52a8\u7684\uff0c\u53ea\u80fd\u4f7f\u7528munin\u7528\u6237\u542f\u52a8\u3002\u5f53\u7136\u5b89\u88c5\u7684\u65f6\u5019\uff0c\u4f1a\u9ed8\u8ba4\u81ea\u5df1\u542f\u52a8\u7684\u3002\u5e76\u4e14\u4f1a\u6bcf\u96945\u5206\u949f\uff0c\u4f1a\u5b9a\u65f6\u6267\u884cmunin-cron\u5b9a\u65f6\u4efb\u52a1\u3002\u57fa\u672c\u4e0a\uff0c\u4fee\u6539\u5b8c\u914d\u7f6e\u8868\u540e\u53ef\u4ee5\u5b8c\u5168\u4e0d\u7528\u7406\u4f1a\uff0c\u7b49\u5f85\u670d\u52a1\u7aef\u81ea\u5df1\u53bb\u66f4\u65b0\u5373\u53ef\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\">\u5f53\u7136\u5982\u679c\u4f60\u4e00\u5b9a\u8981\u9a6c\u4e0a\u66f4\u65b0\uff0c\u53ef\u4ee5\u5207\u6362\u5230munin\u7528\u6237\uff0c\u6267\u884cmunin-cron\u547d\u4ee4\u3002<\/p>\n<div class=\"cnblogs_code\" style=\"color: #000000;\">\n<pre># <span style=\"color: #0000ff;\">su<\/span> munin -c \/etc\/init.d\/munin-cron<\/pre>\n<\/div>\n<p class=\"p0\" style=\"color: #000000;\">\u6267\u884c\u65e0\u62a5\u9519\u7684\u8bdd\uff0c\u662f\u6ca1\u6709\u6253\u5370\u4fe1\u606f\u7684\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<p class=\"p0\" style=\"color: #000000;\"><strong>3\u00a0\u6d4b\u8bd5<\/strong><\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u5728munin.conf\u00a0\u914d\u7f6e\u6587\u4ef6\u91cc\u9762\u6307\u5b9a\u4e86\u751f\u6210\u7684\u76d1\u63a7\u7684html\u76d1\u63a7\u7ed3\u679c\u201chtmldir\u00a0\/var\/cache\/munin\/www\u201d\u3002\u53ea\u9700\u8981\u914d\u7f6e\u4e00\u4e2aweb\u670d\u52a1\u5668\uff0c\u53ef\u8bbf\u95ee\u5230\u76ee\u6807\u8def\u5f84\u201c\/var\/cache\/munin\/www\u201d\u5373\u53ef\u3002\u53ef\u4ee5\u4f7f\u7528nginx\u3001apache\u3001resin\u7b49\u4e3b\u6d41web\u670d\u52a1\u5668\u3002html\u90fd\u662f\u9759\u6001\u6587\u4ef6\uff0c\u6240\u4ee5\u4efb\u4f55web\u670d\u52a1\u5668\u90fd\u662f\u53ef\u4ee5\u7684\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u8bbf\u95eeweb\u670d\u52a1\u5668\uff0c\u5c31\u53ef\u4ee5\u67e5\u770b\u7ed3\u679c\u4e86\u3002<\/p>\n<p class=\"p0\" style=\"color: #000000;\"><img decoding=\"async\" src=\"http:\/\/images.cnitblog.com\/i\/211061\/201405\/282004531036582.png\" alt=\"\" \/><\/p>\n<p class=\"p0\" style=\"color: #000000;\">\n<h3 class=\"p0\" style=\"font-weight: bold; color: #000000;\"><span style=\"color: #008000;\"><strong>\u56db\u3001\u53c2\u8003\u8d44\u6599<\/strong><\/span><\/h3>\n<p class=\"p0\" style=\"color: #000000;\">\u5b98\u65b9\u5b89\u88c5\u8bf4\u660e\uff1a<a style=\"color: #0066aa;\" href=\"http:\/\/munin-monitoring.org\/wiki\/MuninInstallationLinux\">http:\/\/munin-monitoring.org\/wiki\/MuninInstallationLinux<\/a><\/p>\n<p class=\"p0\" style=\"color: #000000;\">\u8f6c\u8f7d\uff1ahttp:\/\/www.cnblogs.com\/rond\/p\/3757804.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3007\u3001\u6458\u8981 munin\u662f\u7528\u4e8eLinux\u7cfb\u7edf\uff08\u4e5f\u53ef\u4ee5\u76d1\u63a7windows\u7cfb\u7edf\uff09\u7684\u76d1\u63a7\u8f6f\u4ef6\u3002munin\u9664\u4e86\u53ef\u4ee5\u76d1\u63a7\u7cfb\u7edf\u7684\u5404\u9879\u6570\u503c\u4e4b\u5916\uff0c\u6700\u5927\u7684\u597d\u5904\u662f\u53ef\u4ee5\u81ea\u5df1\u7f16\u5199\u63d2\u4ef6\u81ea\u5b9a\u4e49\u76d1\u63a7\u9700\u8981\u7684\u6570\u503c\u3002\u6574\u4e2a\u7cfb\u7edf\u7684\u67b6\u6784\u7b80\u5355\u660e\u4e86\uff0c&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[34],"tags":[11,49,13,41],"class_list":["post-964","post","type-post","status-publish","format-standard","hentry","category-software","tag-linux","tag-49","tag-13","tag-41"],"views":3252,"_links":{"self":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts\/964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=964"}],"version-history":[{"count":2,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts\/964\/revisions"}],"predecessor-version":[{"id":966,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=\/wp\/v2\/posts\/964\/revisions\/966"}],"wp:attachment":[{"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yeetrack.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}