{"id":33924,"date":"2023-01-11T05:38:01","date_gmt":"2023-01-10T21:38:01","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=33924"},"modified":"2023-01-11T05:38:45","modified_gmt":"2023-01-10T21:38:45","slug":"server-monitoring-system","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/server-monitoring-system.html","title":{"rendered":"\u652f\u6301\u5168\u5e73\u53f0\u7684\u670d\u52a1\u5668\u76d1\u63a7\u62a5\u8b66\u7cfb\u7edf Shinken"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | Shinken \u662f\u4e00\u4e2a\u7528 Python \u5b9e\u73b0\u7684\u5f00\u6e90\u7684\u4e3b\u673a\u548c\u7f51\u7edc\u76d1\u63a7\u6846\u67b6\uff0c\u5e76\u4e0e Nagios like \u517c\u5bb9\uff0c\u5b83\u53ef\u4ee5\u8fd0\u884c\u5728\u6240\u6709\u652f\u6301 Python \u7a0b\u5e8f\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u6bd4\u5982\u8bf4 Linux\u3001Unix \u548c Windows\u3002Shinken \u662f Jean Gabes \u4e3a\u4e86\u9a8c\u8bc1\u4e00\u4e2a\u65b0\u7684 Nagios \u67b6\u6784\u601d\u8def\u800c\u7f16\u5199\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u5728\u8fd9\u7bc7\u6559\u7a0b\u4e2d\uff0c\u6211\u5c06\u4f1a\u63cf\u8ff0\u5982\u4f55\u4ece\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5 Shinken \u548c\u5411\u76d1\u89c6\u7cfb\u7edf\u4e2d\u6dfb\u52a0\u4e00\u53f0 Linux \u4e3b\u673a\u3002\u6211\u5c06\u4f1a\u4ee5 Ubuntu 16.04 Xenial Xerus \u64cd\u4f5c\u7cfb\u7edf\u6765\u4f5c\u4e3a Shinken \u670d\u52a1\u5668\u548c\u6240\u76d1\u63a7\u7684\u4e3b\u673a\u3002<\/p>\n \u7b2c\u4e00\u6b65 \u5b89\u88c5 Shinken \u670d\u52a1\u5668<\/strong><\/div>\n Shinken \u662f\u4e00\u4e2a Python \u6846\u67b6\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7pip\u5b89\u88c5\u6216\u8005\u4ece\u6e90\u7801\u6765\u5b89\u88c5\u5b83\uff0c\u5728\u8fd9\u4e00\u6b65\u4e2d\uff0c\u6211\u4eec\u5c06\u7528\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5 Shinken\u3002<\/p>\n \u5728\u6211\u4eec\u5f00\u59cb\u5b89\u88c5 Shinken \u4e4b\u524d\u8fd8\u9700\u8981\u5b8c\u6210\u51e0\u4e2a\u6b65\u9aa4\u3002<\/p>\n \u5b89\u88c5\u4e00\u4e9b\u65b0\u7684 Python \u8f6f\u4ef6\u5305\u5e76\u521b\u5efa\u4e00\u4e2a\u540d\u4e3ashinken<\/strong>\u7684\u7cfb\u7edf\u7528\u6237\uff1a<\/p>\n \u4ece GitHub \u4ed3\u5e93\u4e0b\u8f7d Shinken \u6e90\u4ee3\u7801\uff1a<\/p>\n \u7136\u540e\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 Shinken\uff1a<\/p>\n \u7136\u540e\uff0c\u4e3a\u4e86\u5f97\u5230\u66f4\u597d\u7684\u6548\u679c\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u4ece Ubuntu \u8f6f\u4ef6\u5e93\u4e2d\u5b89\u88c5python-cherrypy3\u8f6f\u4ef6\u5305\uff1a<\/p>\n \u5230\u8fd9\u91cc\uff0cShinken \u5df2\u7ecf\u6210\u529f\u5b89\u88c5\uff0c\u63a5\u4e0b\u6765\u6211\u4eec\u5c06 Shinken \u6dfb\u52a0\u5230\u7cfb\u7edf\u542f\u52a8\u9879\u5e76\u4e14\u542f\u52a8\u5b83\uff1a<\/p>\n Webui2 \u662f Shinken \u7684 Web \u754c\u9762\uff08\u5728 shinken.io \u53ef\u4ee5\u627e\u5230\uff09\u3002\u6700\u7b80\u5355\u7684\u5b89\u88c5 Shinken webui2 \u7684\u65b9\u6cd5\u662f\u4f7f\u7528shinken CLI \u547d\u4ee4\uff08\u5fc5\u987b\u4f5c\u4e3ashinken\u7528\u6237\u6267\u884c\uff09\u3002<\/p>\n \u5207\u6362\u5230 shinken \u7528\u6237\uff1a<\/p>\n \u521d\u59cb\u5316 shiken \u914d\u7f6e\u6587\u4ef6\uff0c\u4e0b\u9762\u7684\u547d\u4ee4\u5c06\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u914d\u7f6e\u6587\u4ef6.shinken.ini\uff1a<\/p>\n \u63a5\u4e0b\u6765\u7528 shinken CLI \u547d\u4ee4\u6765\u5b89\u88c5webui2\uff1a<\/p>\n <\/p>\n \u81f3\u6b64 webui2 \u5df2\u7ecf\u5b89\u88c5\u597d\uff0c\u4f46\u662f\u6211\u4eec\u8fd8\u9700\u8981\u5b89\u88c5 MongoDB \u548c\u7528pip\u6765\u5b89\u88c5\u53e6\u4e00\u4e2a Python \u8f6f\u4ef6\u5305\u3002\u5728 root \u4e0b\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n \u63a5\u4e0b\u6765\uff0c\u5207\u6362\u5230 shinken \u76ee\u5f55\u4e0b\u5e76\u4e14\u901a\u8fc7\u7f16\u8f91broker-master.cfg\u6587\u4ef6\u6765\u6dfb\u52a0\u8fd9\u4e2a\u65b0\u7684 webui2 \u6a21\u5757\uff1a<\/p>\n \u5728\u7b2c 40 \u884c\u6dfb\u52a0\u4e00\u4e2a\u6a21\u5757\u9009\u9879\uff1a<\/p>\n \u4fdd\u5b58\u6587\u4ef6\u5e76\u4e14\u9000\u51fa\u7f16\u8f91\u5668\u3002<\/p>\n \u73b0\u5728\u8fdb\u5165contacts\u76ee\u5f55\u4e0b\u7f16\u8f91admin.cfg\u6765\u8fdb\u884c\u7ba1\u7406\u914d\u7f6e\u3002<\/p>\n \u6309\u7167\u5982\u4e0b\u4fee\u6539\uff1a<\/p>\n \u4fdd\u5b58\u548c\u9000\u51fa\u3002<\/p>\n \u5728\u8fd9\u4e00\u6b65\u4e2d\uff0c\u6211\u4eec\u5c06\u5b89\u88c5 Nagios \u63d2\u4ef6\u548c\u4e00\u4e9b Perl \u6a21\u5757\u3002\u7136\u540e\u4ece shinken.io \u5b89\u88c5\u5176\u4ed6\u7684\u8f6f\u4ef6\u5305\u6765\u5b9e\u73b0\u76d1\u89c6\u3002<\/p>\n \u5b89\u88c5 Nagios \u63d2\u4ef6\u548c\u5b89\u88c5 Perl \u6a21\u5757\u6240\u9700\u8981\u7684cpanminus\uff1a<\/p>\n \u7528cpanm\u547d\u4ee4\u6765\u5b89\u88c5 Perl \u6a21\u5757\u3002<\/p>\n \u73b0\u5728\u6211\u4eec\u521b\u5efa\u4e00\u4e2autils.pm\u6587\u4ef6\u7684\u94fe\u63a5\u5230 shinken \u7684\u76ee\u5f55\uff0c\u5e76\u4e14\u4e3aLog_File_Health\u521b\u5efa\u4e86\u4e00\u4e2a\u65b0\u7684\u65e5\u5fd7\u76ee\u5f55 \u3002<\/p>\n \u7136\u540e\uff0c\u4ece shinken.io \u5b89\u88c5 shinken \u8f6f\u4ef6\u5305ssh\u548clinux-snmp\u6765\u76d1\u89c6 SSH \u548c SNMP \uff1a<\/p>\n \u6211\u4eec\u5c06\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u5c06\u88ab\u76d1\u63a7\u7684 Linux \u4e3b\u673a\uff0cIP \u5730\u5740\u4e3a 192.168.1.121\uff0c\u4e3b\u673a\u540d\u4e3a host-one \u7684 Ubuntu 16.04\u3002<\/p>\n \u8fde\u63a5\u5230 host-one \u4e3b\u673a\uff1a<\/p>\n \u4ece Ubuntu \u8f6f\u4ef6\u5e93\u4e2d\u5b89\u88c5 snmp \u548csnmpd \u8f6f\u4ef6\u5305\uff1a<\/p>\n \u7136\u540e\uff0c\u7528vim\u7f16\u8f91snmpd.conf\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n \u6ce8\u91ca\u6389\u7b2c 15 \u884c\u5e76\u53d6\u6d88\u6ce8\u91ca\u7b2c 17 \u884c\uff1a<\/p>\n \u6ce8\u91ca\u6389\u7b2c 51 \u548c 53 \u884c\uff0c\u7136\u540e\u52a0\u4e00\u884c\u65b0\u7684\u914d\u7f6e\uff0c\u5982\u4e0b\uff1a<\/p>\n \u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n \u73b0\u5728\u7528systemctl\u547d\u4ee4\u6765\u542f\u52a8snmpd\u670d\u52a1\uff1a<\/p>\n \u5728 shinken \u670d\u52a1\u5668\u4e0a\u901a\u8fc7\u5728hosts\u6587\u4ef6\u5939\u4e0b\u521b\u5efa\u65b0\u7684\u6587\u4ef6\u6765\u5b9a\u4e49\u4e00\u4e2a\u65b0\u7684\u4e3b\u673a\uff1a<\/p>\n \u7c98\u8d34\u5982\u4e0b\u914d\u7f6e\u4fe1\u606f\uff1a<\/p>\n \u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n \u5728 shinken \u670d\u52a1\u5668\u4e0a\u7f16\u8f91 SNMP \u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n \u5c06public\u6539\u4e3amypass -\u5fc5\u987b\u548c\u4f60\u5728\u5ba2\u6237\u7aefsnmpd\u914d\u7f6e\u6587\u4ef6\u4e2d\u4f7f\u7528\u7684\u5bc6\u7801\u76f8\u540c\uff1a<\/p>\n \u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n \u73b0\u5728\u5c06\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u90fd\u91cd\u542f\uff1a<\/p>\n \u73b0\u5728 Linux \u4e3b\u673a\u5df2\u7ecf\u88ab\u6210\u529f\u5730\u6dfb\u52a0\u5230 shinken \u670d\u52a1\u5668\u4e2d\u4e86\u3002<\/p>\n \u5728\u7aef\u53e3 7677 \u8bbf\u95ee Shinken webui2 \uff08\u5c06 URL \u4e2d\u7684 IP \u66ff\u6362\u6210\u4f60\u81ea\u5df1\u7684 IP \u5730\u5740\uff09\uff1a<\/p>\n http:\/\/192.168.1.120:7767<\/p>\n \u7528\u7ba1\u7406\u5458\u7528\u6237\u548c\u5bc6\u7801\u767b\u5f55\uff08\u4f60\u5728 admin.cfg \u6587\u4ef6\u4e2d\u8bbe\u7f6e\u7684\uff09<\/p>\n <\/p>\n Webui2 \u4e2d\u7684 Shinken \u9762\u677f\uff1a \u6211\u4eec\u7684\u4e24\u4e2a\u670d\u52a1\u5668\u6b63\u5728\u88ab Shinken \u76d1\u63a7\uff1a \u5217\u51fa\u6240\u6709\u88ab linux-snmp \u76d1\u63a7\u7684\u670d\u52a1\uff1a \u6240\u6709\u4e3b\u673a\u548c\u670d\u52a1\u7684\u72b6\u6001\u4fe1\u606f\uff1a \u5f53\u4f60\u5f97\u5230\u5982\u4e0b\u7684 NTP \u9519\u8bef\u63d0\u793a<\/p>\n \u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u5728\u6240\u6709 Linux \u4e3b\u673a\u4e0a\u5b89\u88c5 ntp\u3002<\/p>\n \u7f16\u8f91 ntp \u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n \u6ce8\u91ca\u6389\u6240\u6709 pools \u5e76\u66ff\u6362\u4e3a\uff1a<\/p>\n \u7136\u540e\uff0c\u5728\u65b0\u7684\u4e00\u884c\u6dfb\u52a0\u5982\u4e0b\u9650\u5236\u89c4\u5219\uff1a<\/p>\n \u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n \u542f\u52a8 ntp \u5e76\u4e14\u68c0\u67e5 Shinken \u9762\u677f\u3002<\/p>\n \u4ece github \u4ed3\u5e93\u4e0b\u8f7d\u6e90\u4ee3\u7801\u5230 shinken \u7684\u5e93\u76ee\u5f55\u4e0b\uff1a<\/p>\n \u8fd9\u662f\u9519\u8bef\u4fe1\u606f\uff1a<\/p>\n \u68c0\u67e5\u4f60\u7684\u7f51\u7edc\u63a5\u53e3\u5e76\u4e14\u7f16\u8f91linux-snmp\u6a21\u7248\u3002<\/p>\n \u5728\u6211\u7684 Ununtu \u670d\u52a1\u5668\uff0c\u7f51\u5361\u662f \u201cenp0s8\u201d\uff0c\u800c\u4e0d\u662f eth0\uff0c\u6240\u4ee5\u6211\u9047\u5230\u4e86\u8fd9\u4e2a\u9519\u8bef\u3002 \u5728\u7b2c 24 \u884c\u6dfb\u52a0\u7f51\u7edc\u63a5\u53e3\u4fe1\u606f\uff1a<\/p>\n \u4fdd\u5b58\u5e76\u9000\u51fa\u3002<\/p>\n \u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-7821-1.html<\/a><\/p>\n |