{"id":469,"date":"2020-11-30T00:52:00","date_gmt":"2020-11-29T16:52:00","guid":{"rendered":"http:\/\/www.lisaeats.com\/?p=469"},"modified":"2023-08-11T10:17:16","modified_gmt":"2023-08-11T02:17:16","slug":"testing-logging-monitoring","status":"publish","type":"post","link":"http:\/\/www.lisaeats.com\/2020\/11\/30\/testing-logging-monitoring\/","title":{"rendered":"\u6d4b\u8bd5\u53f3\u79fb\uff1a\u65e5\u5fd7\u6536\u96c6\u4e0e\u76d1\u63a7"},"content":{"rendered":"
\u672c\u6587\u9996\u53d1\u4e8e\u300cBY\u6797\u5b50<\/a>\u300d\uff0c\u8f6c\u8f7d\u8bf7\u53c2\u8003\u7248\u6743\u58f0\u660e<\/a>\u3002<\/p>\n \u6211\u5728\u654f\u6377\u6d4b\u8bd5\u7cfb\u5217\u76f4\u64ad\u8bfe\u7a0b\u91cc\u8bb2\u5230\u4e86\u300a\u6d4b\u8bd5\u53f3\u79fb\u300b\uff0c\u4e5f\u5c31\u662f\u6536\u96c6\u751f\u4ea7\u73af\u5883\u7684\u6570\u636e\u4fe1\u606f\uff0c\u5206\u6790\u548c\u5229\u7528\u8fd9\u4e9b\u4fe1\u606f\u4f18\u5316\u8f6f\u4ef6\u5f00\u53d1\u548c\u6d4b\u8bd5\u73af\u8282\uff0c\u4ee5\u8fdb\u4e00\u6b65\u63d0\u9ad8\u8d28\u91cf\u3002\u751f\u4ea7\u73af\u5883\u7684\u6570\u636e\u4fe1\u606f\u4e2d\u6700\u4e3a\u91cd\u8981\u7684\u5c31\u662f\u65e5\u5fd7\u4fe1\u606f\uff0c\u56e0\u6b64\uff0c\u6536\u96c6\u65e5\u5fd7\u4fe1\u606f\u5e76\u5229\u7528\u65e5\u5fd7\u4fe1\u606f\u8fdb\u884c\u76d1\u63a7\u4e5f\u662f\u6d4b\u8bd5\u53f3\u79fb\u6700\u91cd\u8981\u7684\u5185\u5bb9\u3002<\/p>\n \u672c\u6587\u5c06\u4ece\u65e5\u5fd7\u6536\u96c6\u7684\u5fc5\u8981\u6027\u3001\u65e5\u5fd7\u6536\u96c6\u65b9\u6848\u3001\u65e5\u5fd7\u76d1\u63a7\u673a\u5236\u548c\u9ad8\u6548\u65e5\u5fd7\u7ba1\u7406\u5b9e\u8df5\u51e0\u4e2a\u65b9\u9762\u8ddf\u5927\u5bb6\u4e00\u8d77\u63a2\u8ba8\u6d4b\u8bd5\u53f3\u79fb\u4e4b\u65e5\u5fd7\u6536\u96c6\u4e0e\u76d1\u63a7\u3002<\/p>\n \u968f\u7740\u79d1\u6280\u7684\u53d1\u5c55\uff0c\u4e1a\u52a1\u5f62\u6001\u3001\u4e1a\u52a1\u7c7b\u578b\u3001\u4e1a\u52a1\u590d\u6742\u5ea6\u90fd\u53d1\u751f\u4e86\u5f88\u5927\u7684\u53d8\u5316\uff0c\u76f8\u5e94\u5730\uff0c\u4e1a\u52a1\u6570\u636e\u91cf\u548c\u590d\u6742\u5ea6\u4e5f\u589e\u52a0\u4e86\u4e0d\u5c11\u3002\u4e3a\u4e86\u652f\u6491\u590d\u6742\u7684\u4e1a\u52a1\u548c\u5927\u7684\u6570\u636e\u91cf\uff0c\u6280\u672f\u67b6\u6784\u548c\u57fa\u7840\u8bbe\u65bd\u4e5f\u5728\u6f14\u8fdb\u53d8\u5316\u3002\u6240\u6709\u8fd9\u4e9b\u56e0\u7d20\uff0c\u5bfc\u81f4\u8f6f\u4ef6\u7cfb\u7edf\u751f\u6001\u53d8\u5f97\u65e5\u76ca\u590d\u6742\u548c\u4e0d\u786e\u5b9a\u3002\u800c\u5728\u5904\u4e8e\u4e0d\u786e\u5b9a\u72b6\u6001\u7684\u8f6f\u4ef6\u7cfb\u7edf\uff0c\u4f20\u7edf\u7684\u8f6f\u4ef6\u6d4b\u8bd5\u65b9\u6cd5\u663e\u7136\u884c\u4e0d\u901a\uff0c\u4e8e\u662f\u5229\u7528\u751f\u4ea7\u73af\u5883\u4fe1\u606f\uff0c\u5c24\u5176\u662f\u5176\u4e2d\u7684\u65e5\u5fd7\u4fe1\u606f\uff0c\u6210\u4e3a\u4e86\u65b0\u65f6\u4ee3\u8f6f\u4ef6\u8d28\u91cf\u4fdd\u969c\u7684\u5fc5\u8981\u6761\u4ef6\u3002<\/p>\n <\/p>\n \u65e5\u5fd7\u4fe1\u606f\u7684\u4ef7\u503c\u90a3\u4e48\uff0c\u65e5\u5fd7\u4fe1\u606f\u8fd9\u4e48\u91cd\u8981\uff0c\u5b83\u7684\u4ef7\u503c\u5230\u5e95\u4f53\u73b0\u5728\u54ea\u91cc\u5462\uff1f\u6211\u8ba4\u4e3a\u81f3\u5c11\u6709\u4ee5\u4e0b\u56db\u4e2a\u65b9\u9762\u7684\u4ef7\u503c\uff1a<\/p>\n 1. \u5b9a\u4f4d\u529f\u80fd\u95ee\u9898<\/strong><\/p>\n \u5f53\u6211\u4eec\u7684\u8f6f\u4ef6\u7cfb\u7edf\u51fa\u73b0bug\u7684\u65f6\u5019\uff0c\u6700\u5e38\u7528\u7684\u8bca\u65ad\u65b9\u5f0f\u5c31\u662f\u5c1d\u8bd5\u91cd\u73b0\u5e76\u4e14\u67e5\u770b\u65e5\u5fd7\u8bb0\u5f55\u3002\u56e0\u6b64\uff0c\u65e5\u5fd7\u4fe1\u606f\u5e2e\u52a9\u8bca\u65ad\u548c\u5b9a\u4f4d\u529f\u80fd\u95ee\u9898\u5e94\u8be5\u662f\u4eba\u4eba\u7686\u77e5\u7684\u4e00\u79cd\u8bca\u65ad\u65b9\u6cd5\uff0c\u65e0\u9700\u8d58\u8ff0\u3002<\/p>\n 2. \u5c55\u793a\u6027\u80fd\u8d8b\u52bf<\/strong><\/p>\n \u65e5\u5fd7\u4fe1\u606f\u53ef\u4ee5\u8bb0\u5f55\u5230\u8bf7\u6c42\u7684\u54cd\u5e94\u72b6\u6001\u3001\u65f6\u95f4\u7b49\uff0c\u5229\u7528\u8fd9\u4e9b\u4fe1\u606f\u53ef\u4ee5\u5206\u6790\u5f97\u51fa\u7cfb\u7edf\u7684\u6027\u80fd\u72b6\u6001\u3002\u5982\u679c\u5bf9\u4e00\u6bb5\u65f6\u95f4\u5185\u7684\u6027\u80fd\u72b6\u6001\u8fdb\u884c\u6301\u7eed\u7684\u5206\u6790\u76d1\u63a7\uff0c\u5c31\u53ef\u4ee5\u5c55\u793a\u6027\u80fd\u8d8b\u52bf\u53d8\u5316\u3002<\/p>\n 3. \u66b4\u9732\u5b89\u5168\u9690\u60a3<\/strong><\/p>\n \u65e5\u5fd7\u4fe1\u606f\u53ef\u4ee5\u8bb0\u5f55\u6570\u636e\u88ab\u8bbf\u95ee\u7684\u60c5\u51b5\uff0c\u5bf9\u4e8e\u8f83\u4e3a\u4e25\u91cd\u7684\u4e1a\u52a1\u5b89\u5168\u95ee\u9898\uff0c\u6bd4\u5982\u6570\u636e\u88ab\u8d8a\u6743\u8bbf\u95ee\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u5f88\u597d\u7684\u5229\u7528\u65e5\u5fd7\u4fe1\u606f\u6765\u66b4\u9732\u3002<\/p>\n 4. \u4f18\u5316\u4e1a\u52a1\u4ef7\u503c<\/strong><\/p>\n \u5229\u7528\u65e5\u5fd7\u4fe1\u606f\uff0c\u53ef\u4ee5\u5206\u6790\u51fa\u54ea\u4e9b\u4e1a\u52a1\u6a21\u5757\u6216\u4e1a\u52a1\u6d41\u7a0b\u88ab\u8bbf\u95ee\u8f83\u591a\u6216\u8f83\u5c11\u3001\u7528\u6237\u884c\u4e3a\u4e60\u60ef\u662f\u4ec0\u4e48\u6837\u7684\u7b49\uff0c\u800c\u8fd9\u4e9b\u662f\u53ef\u4ee5\u8fdb\u4e00\u6b65\u5206\u6790\u6765\u4f18\u5316\u4f01\u4e1a\u4e1a\u52a1\u4ef7\u503c\u7684\u3002<\/p>\n \u65e5\u5fd7\u4fe1\u606f\u7684\u4ef7\u503c\u8fd9\u4e48\u5927\uff0c\u90a3\u5c31\u8d76\u7d27\u5229\u7528\u8d77\u6765\u5427\u3002<\/p>\n \u4e0d\u8fc7\uff0c\u4e5f\u4e0d\u662f\u90a3\u4e48\u7b80\u5355\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u65e5\u5fd7\u4fe1\u606f\u7684\u6536\u96c6\u8fd8\u662f\u6709\u4e0d\u5c11\u75db\u70b9\u7684\uff1a<\/p>\n \u9488\u5bf9\u8fd9\u79cd\u65e5\u5fd7\u4fe1\u606f\u590d\u6742\u7684\u60c5\u51b5\uff0c\u6211\u4eec\u9700\u8981\u4e00\u4e2a\u96c6\u4e2d\u7ba1\u7406\u65e5\u5fd7\u7684\u65b9\u6848\u3002<\/p>\n <\/p>\n \u96c6\u4e2d\u7684\u65e5\u5fd7\u7ba1\u7406\u65b9\u6848\u9700\u8981\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6\uff1a<\/p>\n \u5229\u7528\u4e0a\u8ff0\u65b9\u6848\u96c6\u4e2d\u7ba1\u7406\u7684\u65e5\u5fd7\uff0c\u5c31\u53ef\u4ee5\u5feb\u901f\u5bf9\u65e5\u5fd7\u8fdb\u884c\u67e5\u8be2\uff0c\u53ef\u4ee5\u901a\u8fc7\u56fe\u8868\u7684\u65b9\u5f0f\u5c55\u793a\u7cfb\u7edf\u5e94\u7528\u8fd0\u884c\u60c5\u51b5\uff0c\u5e76\u4e14\u6839\u636e\u65e5\u5fd7\u6570\u636e\u8bbe\u7f6e\u89c4\u5219\u5bf9\u5f02\u5e38\u60c5\u51b5\u8fdb\u884c\u81ea\u52a8\u62a5\u8b66\u3002<\/p>\n \u65e2\u7136\u6709\u8fd9\u4e2a\u9700\u6c42\uff0c\u81ea\u7136\u4e5f\u662f\u6709\u5f88\u591a\u5de5\u5177\u652f\u6301\u7684\u3002\u76ee\u524d\uff0c\u96c6\u4e2d\u65e5\u5fd7\u7ba1\u7406\u5de5\u5177\u6700\u5e38\u89c1\u7684\u6709\u4e24\u4e2a\uff1aSplunk\u548cELK\u3002\u4e0b\u9762\u7b80\u5355\u4ecb\u7ecd\uff0c\u66f4\u591a\u8be6\u7ec6\u5185\u5bb9\u8bf7\u81ea\u884c\u7f51\u4e0a\u641c\u7d22\u3002<\/p>\n Splunk<\/strong><\/p>\n Splunk\u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684\u5546\u4e1a\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u79f0\u4e3a\u201cData-to-Everything\u201d\u5e73\u53f0\uff0c\u529f\u80fd\u9f50\u5168\uff0c\u641c\u7d22\u65b9\u4fbf\uff0c\u5f53\u7136\u4ef7\u683c\u4e5f\u4e0d\u83f2\u3002<\/p>\n ELK\u6846\u67b6<\/strong><\/p>\n ELK\u5206\u522b\u662fElasticsearch\u3001Logstash\u3001Kibana\u4e09\u4e2a\u5de5\u5177\u9996\u5b57\u6bcd\uff0c\u800c\u8fd9\u4e09\u4e2a\u5de5\u5177\u5206\u522b\u4e3a\u65e5\u5fd7\u6536\u96c6\u63d0\u4f9b\u4e0d\u540c\u7684\u529f\u80fd\uff1a<\/p>\n \u65e5\u5fd7\u96c6\u4e2d\u7ba1\u7406\u65b9\u6848\u548c\u5de5\u5177\u90fd\u4ecb\u7ecd\u4e86\uff0c\u5728\u65e5\u5fd7\u96c6\u4e2d\u6536\u96c6\u7684\u8fc7\u7a0b\u4e2d\u8fd8\u53ef\u80fd\u9047\u5230\u54ea\u4e9b\u95ee\u9898\u5462\uff1f\u6839\u636e\u6211\u7684\u7ecf\u9a8c\uff0c\u65e5\u5fd7\u672c\u8eab\u53ef\u80fd\u5b58\u5728\u4e0b\u5217\u95ee\u9898\uff1a<\/p>\n 1. \u7ea7\u522b\u5b9a\u4e49\u4e0d\u6e05\u6670<\/strong><\/p>\n \u901a\u5e38\u5b9a\u4e49\u7684\u6253\u5370\u65e5\u5fd7\u7ea7\u522b\u4ece\u9ad8\u5230\u4f4e\u6709\uff1a<\/p>\n \u9664\u4e86\u4e0a\u9762\u51e0\u7c7b\u7ea7\u522b\uff0c\u4e5f\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u56e2\u961f\u7684\u60c5\u51b5\u81ea\u5b9a\u4e49\u65e5\u5fd7\u7ea7\u522b\uff0c\u6bd4\u5982\u53ef\u4ee5\u6839\u636e\u54cd\u5e94\u7ea7\u522b\uff08\u54cd\u5e94\u7684\u65b9\u5f0f\u3001\u9700\u8981\u53c2\u4e0e\u7684\u4eba\u5458\u7b49\uff09\u6765\u5b9a\u4e49\u65e5\u5fd7\u7ea7\u522b\u3002<\/p>\n \u5982\u679c\u8fd9\u4e9b\u65e5\u5fd7\u7ea7\u522b\u5b9a\u4e49\u4e0d\u6e05\u6670\u5bfc\u81f4\u65e5\u5fd7\u7ea7\u522b\u4e71\u7528\uff0c\u5c31\u4f1a\u5e26\u6765\u6d6a\u8d39\u6216\u8005\u9519\u8fc7\u91cd\u8981\u7684\u65e5\u5fd7\u4fe1\u606f\u3002\u6bd4\u5982\uff1a\u4e4b\u524d\u9879\u76ee\u7ecf\u5386\u8fc7\u5927\u91cf\u7684\u201c\u8b66\u544a\u201d\u7ea7\u522b\u65e5\u5fd7\u88ab\u8bef\u8bb0\u4e3a\u201c\u9519\u8bef\u201d\uff0c\u56e2\u961f\u82b1\u8d39\u5927\u91cf\u7684\u65f6\u95f4\u5904\u7406\u672c\u4e0d\u9700\u8981\u5904\u7406\u7684\u65e5\u5fd7\u4fe1\u606f\u3002<\/p>\n \u56e0\u6b64\uff0c\u5bf9\u65e5\u5fd7\u7ea7\u522b\u7684\u89c4\u8303\u5b9a\u4e49\u975e\u5e38\u91cd\u8981\u3002\u4e0d\u7ba1\u91c7\u7528\u4ec0\u4e48\u7ea7\u522b\u5b9a\u4e49\uff0c\u52a1\u5fc5\u8981\u8ba9\u56e2\u961f\u90fd\u80fd\u6e05\u6670\u7684\u77e5\u9053\uff0c\u5e76\u4e14\u4e25\u683c\u6309\u7167\u6240\u5b9a\u4e49\u7ea7\u522b\u6765\u6dfb\u52a0\u65e5\u5fd7\u4fe1\u606f\u3002<\/p>\n 2. \u5b58\u50a8\u8def\u5f84\u4e0d\u4e00\u81f4<\/strong><\/p>\n \u591a\u4e2a\u5fae\u670d\u52a1\u7531\u4e0d\u540c\u56e2\u961f\u5f00\u53d1\u7684\u60c5\u51b5\u53ef\u80fd\u5bfc\u81f4\u4e0d\u540c\u670d\u52a1\u7684\u65e5\u5fd7\u5b58\u50a8\u8def\u5f84\u4e0d\u4e00\u81f4\uff0c\u8fd9\u6837\u7528\u5de5\u5177\u6765\u96c6\u4e2d\u6536\u96c6\u7684\u8bdd\u53ef\u80fd\u9057\u6f0f\u67d0\u4e9b\u65e5\u5fd7\u4fe1\u606f\u3002\u6211\u4eec\u56e2\u961f\u5728\u521d\u671f\u4f7f\u7528Splunk\u6536\u96c6\u65e5\u5fd7\u7684\u65f6\u5019\u5c31\u53d1\u751f\u4e86\u8fd9\u79cd\u60c5\u51b5\u3002<\/p>\n \u56e0\u6b64\uff0c\u9700\u8981\u5728\u56e2\u961f\u5185\u90e8\u7edf\u4e00\u65e5\u5fd7\u5b58\u50a8\u8def\u5f84\uff0c\u5e76\u4e14\u5728\u4f7f\u7528\u5de5\u5177\u96c6\u4e2d\u6536\u96c6\u7684\u65f6\u5019\u8981\u786e\u4fdd\u6240\u6709\u670d\u52a1\u7684\u65e5\u5fd7\u4fe1\u606f\u90fd\u80fd\u6b63\u5e38\u5bfc\u5165\u3002<\/p>\n 3. \u65e5\u5fd7\u4fe1\u606f\u4e0d\u591f\u7528<\/strong><\/p>\n \u65e5\u5fd7\u8bb0\u5f55\u662f\u4e3a\u4e86\u5e2e\u52a9\u8bca\u65ad\u5b9a\u4f4d\u95ee\u9898\uff0c\u5982\u679c\u65e5\u5fd7\u4fe1\u606f\u4e0d\u5168\uff0c\u5c31\u4e0d\u4ec5\u4e0d\u80fd\u5e2e\u52a9\u8bca\u65ad\u5b9a\u4f4d\u95ee\u9898\uff0c\u8fd8\u589e\u52a0\u4e86\u5f88\u591a\u989d\u5916\u7684\u5f00\u9500\uff0c\u662f\u6beb\u65e0\u4ef7\u503c\u7684\u3002<\/p>\n \u6bd4\u5982\uff0c\u6709\u4e9b\u65e5\u5fd7\u53ea\u662f\u8bb0\u5f55\u4e86\u9519\u8bef\u4ee3\u7801\uff0c\u5177\u4f53\u8fdb\u884c\u4ec0\u4e48\u64cd\u4f5c\u3001\u54ea\u4e2a\u8bf7\u6c42\u51fa\u9519\u7b49\u6709\u7528\u7684\u4fe1\u606f\u90fd\u7f3a\u5931\uff0c\u8fd9\u6837\u7684\u65e5\u5fd7\u662f\u5b8c\u5168\u6ca1\u6709\u7528\u7684\u3002<\/p>\n \u9664\u4e86\u4e0d\u591f\u7528\uff0c\u53ef\u80fd\u8fd8\u6709\u4e00\u79cd\u60c5\u51b5\u662f\u65e5\u5fd7\u4fe1\u606f\u8bb0\u5f55\u8fc7\u5269\uff0c\u5bfc\u81f4\u6ca1\u6709\u5fc5\u8981\u8bb0\u5f55\u7684\u3001\u6216\u8005\u4e00\u4e9b\u4e2a\u4eba\u9690\u79c1\u4fe1\u606f\u7b49\u90fd\u8bb0\u5f55\u5728\u65e5\u5fd7\u91cc\uff0c\u8fd9\u4e5f\u662f\u4e0d\u884c\u7684\uff0c\u8fd9\u4e2a\u95ee\u9898\u53ef\u80fd\u66f4\u4e25\u91cd\uff0c\u4e5f\u5c31\u662f\u53ef\u80fd\u5b58\u5728\u5b89\u5168\u9690\u60a3\u3002<\/p>\n \u56e0\u6b64\uff0c\u56e2\u961f\u5bf9\u65e5\u5fd7\u9700\u8981\u8bb0\u5f55\u7684\u4fe1\u606f\u8fbe\u6210\u5171\u8bc6\uff0c\u786e\u4fdd\u8bb0\u5f55\u8db3\u591f\u6709\u7528\uff0c\u4e14\u6ca1\u6709\u5b89\u5168\u9690\u60a3\u3002<\/p>\n 4. \u8bb0\u5f55\u683c\u5f0f\u4e0d\u4e00\u81f4<\/strong><\/p>\n \u65e5\u5fd7\u8bb0\u5f55\u7684\u683c\u5f0f\u4e5f\u662f\u6709\u8981\u6c42\u7684\uff0c\u9700\u8981\u7edf\u4e00\u683c\u5f0f\uff0c\u8fd9\u4e2a\u4e3b\u8981\u662f\u65b9\u4fbf\u65e5\u5fd7\u6536\u96c6\u5de5\u5177\u8fdb\u884c\u8fc7\u6ee4\u548c\u805a\u5408\u3002\u5982\u679c\u4e0d\u540c\u7684\u670d\u52a1\u6216\u8005\u4e0d\u540c\u7684\u529f\u80fd\u6a21\u5757\u8bb0\u5f55\u7684\u65e5\u5fd7\u683c\u5f0f\u4e0d\u4e00\u81f4\uff0c\u5c31\u5f88\u96be\u901a\u8fc7\u5de5\u5177\u805a\u5408\u7684\u65b9\u5f0f\u5904\u7406\u540c\u4e00\u7c7b\u578b\u7684\u65e5\u5fd7\uff0c\u7ed9\u65e5\u5fd7\u51fa\u6765\u5e26\u6765\u5f88\u5927\u7684\u4e0d\u4fbf\u3002<\/p>\n \u8fd9\u79cd\u60c5\u51b5\u63a8\u8350\u4f7f\u7528\u201c\u7ed3\u6784\u5316\u65e5\u5fd7<\/a>\u201d\u6280\u672f\uff0c\u5c06\u65e5\u5fd7\u683c\u5f0f\u7edf\u4e00\u3001\u89c4\u8303\u7684\u8bb0\u5f55\u6e05\u695a\u3002<\/p>\n \u7ed3\u6784\u5316\u65e5\u5fd7\uff08Structured Logging\uff09<\/strong>\uff0c\u4e5f\u53eb\u8bed\u4e49\u5316\u65e5\u5fd7\uff0c\u4e3b\u8981\u662f\u4e3a\u4e86\u589e\u52a0\u65e5\u5fd7\u7684\u53ef\u8bfb\u6027\uff0c\u6bd4\u5982\u5728\u65e5\u5fd7\u4e2d\u589e\u52a0\u76f8\u5173\u7279\u6027\u4ee3\u53f7\u3001\u8bf7\u6c42\u7684\u987a\u5e8f\u7b49\u4fe1\u606f\uff0c\u5e2e\u52a9\u8fd0\u7ef4\u4eba\u5458\u7406\u89e3\u4f18\u5148\u7ea7\uff0c\u5feb\u901f\u5b9a\u4f4d\u95ee\u9898\uff0c\u6c9f\u901a\u66f4\u52a0\u987a\u7545\u3002<\/p>\n \u65e5\u5fd7\u96c6\u4e2d\u6536\u96c6\u7ba1\u7406\u4ee5\u540e\uff0c\u4e0b\u4e00\u6b65\u5c31\u662f\u5c06\u6536\u96c6\u5230\u7684\u65e5\u5fd7\u6570\u636e\u8fdb\u884c\u5206\u6790\u5e76\u53ef\u89c6\u5316\uff0c\u7136\u540e\u5229\u7528\u8fd9\u4e9b\u5206\u6790\u7ed3\u679c\uff0c\u901a\u8fc7\u4e00\u5b9a\u7684\u89c4\u5219\u8bbe\u7f6e\uff0c\u5bf9\u5f02\u5e38\u60c5\u51b5\u8fdb\u884c\u76d1\u63a7\u9884\u8b66\u3002<\/p>\n \u65e5\u5fd7\u76d1\u63a7\u9884\u8b66\u6709\u51e0\u4e2a\u96be\u70b9\uff0c\u90a3\u5c31\u662f\u65e5\u5fd7\u76d1\u63a7\u7684\u5185\u5bb9\u3001\u5f62\u5f0f\u548c\u54cd\u5e94\u673a\u5236\uff0c\u8fd9\u51e0\u70b9\u8981\u5904\u7406\u597d\u624d\u80fd\u505a\u597d\u65e5\u5fd7\u76d1\u63a7\u9884\u8b66\u3002<\/p>\n 1. \u76d1\u63a7\u9884\u8b66\u7684\u5185\u5bb9<\/strong><\/p>\n \u8fdb\u884c\u76d1\u63a7\u4e4b\u524d\u52a1\u5fc5\u641e\u6e05\u695a\u9700\u8981\u76d1\u63a7\u4ec0\u4e48\u5185\u5bb9\uff0c\u54ea\u4e9b\u670d\u52a1\u9700\u8981\u91cd\u70b9\u76d1\u63a7\uff1f\u6709\u54ea\u4e9b\u5f02\u5e38\u573a\u666f\u9700\u8981\u53d1\u51fa\u9884\u8b66\u8b66\u62a5\uff1f\u4e3a\u4ec0\u4e48\uff1f<\/p>\n \u53ef\u4ee5\u4ece\u4ee5\u4e0b\u4e09\u4e2a\u65b9\u9762\u53bb\u8003\u8651\uff1a\u4e1a\u52a1\u529f\u80fd\u3001\u6027\u80fd\u6307\u6807\u3001\u5b89\u5168\u6f0f\u6d1e\u3002<\/p>\n <\/p>\n \u76d1\u63a7\u9884\u8b66\u7684\u5185\u5bb9- \u4e1a\u52a1\u529f\u80fd\uff1a\u786e\u4fdd\u4e1a\u52a1\u529f\u80fd\u7684\u6b63\u5e38\u8fd0\u8f6c\uff0c\u53ef\u80fd\u5bf9\u4e8e\u5173\u952e\u4e1a\u52a1\u9700\u8981\u8fdb\u884c\u76d1\u63a7\uff0c\u4e00\u65e6\u6709\u5f02\u5e38\u7684\u4e1a\u52a1\u573a\u666f\u51fa\u73b0\u6839\u636e\u4e25\u91cd\u7a0b\u5ea6\u9700\u8981\u53d1\u51fa\u8b66\u62a5\u3002\u56e0\u6b64\uff0c\u9700\u8981\u786e\u8ba4\u54ea\u4e9b\u662f\u5173\u952e\u4e1a\u52a1\u3002<\/p>\n 2. \u76d1\u63a7\u9884\u8b66\u7684\u5f62\u5f0f<\/strong><\/p>\n \u786e\u5b9a\u4e86\u76d1\u63a7\u7684\u5185\u5bb9\uff0c\u4e0b\u4e00\u6b65\u5c31\u662f\u8981\u786e\u5b9a\u76d1\u63a7\u7ed3\u679c\u5982\u4f55\u5c55\u793a\u3001\u9884\u8b66\u8b66\u62a5\u8be5\u4ee5\u4ec0\u4e48\u65b9\u5f0f\u53d1\u51fa\u3002\u901a\u5e38\u6709\u4ee5\u4e0b\u4e09\u79cd\u65b9\u5f0f\uff1a\u56fe\u8868\u5c55\u793a\u3001\u90ae\u4ef6\u901a\u77e5\u3001\u5373\u65f6\u6d88\u606f\u6216\u7535\u8bdd\u62a5\u8b66\u3002<\/p>\n <\/p>\n \u76d1\u63a7\u9884\u8b66\u7684\u5f62\u5f0f- \u56fe\u8868\u65b9\u5f0f\u5c55\u793a\u7684\u4fe1\u606f\u8f83\u5168\u9762\uff0c\u65b9\u4fbf\u5206\u6790\uff0c\u9002\u5408\u4f18\u5148\u7ea7\u8f83\u4f4e\u7684\u4fe1\u606f\uff0c\u9700\u8981\u4eba\u4e3a\u4e3b\u52a8\u53bb\u67e5\u770b\u3002<\/p>\n 3. \u76d1\u63a7\u9884\u8b66\u7684\u54cd\u5e94\u673a\u5236<\/strong><\/p>\n \u76d1\u63a7\u7684\u5185\u5bb9\u548c\u5f62\u5f0f\u786e\u5b9a\u4e86\uff0c\u76d1\u63a7\u9884\u8b66\u53ef\u4ee5\u641e\u8d77\u6765\u4e86\u3002\u4e0d\u8fc7\uff0c\u4e00\u65e6\u5f02\u5e38\u53d1\u751f\uff0c\u56e2\u961f\u8be5\u5982\u4f55\u54cd\u5e94\u5462\uff1f\u8fd9\u65f6\u54cd\u5e94\u673a\u5236\u5c31\u7279\u522b\u91cd\u8981\u4e86\u3002\u54cd\u5e94\u673a\u5236\u9700\u8981\u4ece\u4ee5\u4e0b\u4e09\u4e2a\u65b9\u9762\u53bb\u505a\u5de5\u4f5c\uff1a\u54cd\u5e94\u7ea7\u522b\u3001\u804c\u8d23\u5230\u4f4d\u3001\u53cd\u9988\u56de\u987e\u3002<\/p>\n <\/p>\n \u76d1\u63a7\u9884\u8b66\u7684\u54cd\u5e94\u673a\u5236- \u6e05\u695a\u5b9a\u4e49\u4e0d\u540c\u7684\u54cd\u5e94\u7ea7\u522b\u3001\u4ee5\u53ca\u5bf9\u5e94\u7ea7\u522b\u7684\u884c\u52a8\u5f88\u91cd\u8981\uff0c\u786e\u4fdd\u5bf9\u5f85\u4e0d\u540c\u4f18\u5148\u7ea7\u7684\u6545\u969c\u6709\u4e0d\u540c\u7684\u54cd\u5e94\u901f\u5ea6\u548c\u54cd\u5e94\u65b9\u5f0f\u3002<\/p>\n \u65e5\u5fd7\u4fe1\u606f\u7684\u53ef\u89c6\u5316\u5bf9\u76d1\u63a7\u81f3\u5173\u91cd\u8981\uff0c\u53ef\u89c6\u5316\u540e\u53ef\u4ee5\u76f4\u89c2\u3001\u6e05\u6670\u7684\u770b\u5230\u6570\u636e\u8d70\u52bf\uff0c\u65b9\u4fbf\u548c\u5386\u53f2\u6570\u636e\u8fdb\u884c\u5bf9\u6bd4\uff0c\u63d0\u9ad8\u5206\u6790\u6548\u7387\uff1b\u53ef\u89c6\u5316\u9664\u4e86\u53ef\u4ee5\u9488\u5bf9\u4e00\u6bb5\u65f6\u95f4\u7684\u8d8b\u52bf\u6027\u6570\u636e\uff0c\u8fd8\u53ef\u4ee5\u662f\u9488\u5bf9\u5b9e\u65f6\u641c\u7d22\u7ed3\u679c\uff0c\u4e5f\u53ef\u4ee5\u662f\u6839\u636e\u6761\u4ef6\u8bbe\u7f6e\u7684\u5b9e\u65f6\u76d1\u63a7\u6570\u636e\u3002<\/p>\n \u524d\u9762\u4ecb\u7ecd\u7684\u5de5\u5177Splunk\u548cELK\u7684Kibana\u90fd\u5177\u5907\u5f88\u597d\u7684\u65e5\u5fd7\u6570\u636e\u53ef\u89c6\u5316\u529f\u80fd\u3002<\/p>\n Splunk<\/strong><\/p>\n Splunk\u63d0\u4f9b\u5217\u8868\u3001\u7ebf\u72b6\u56fe\u3001\u997c\u72b6\u56fe\u548c\u67f1\u72b6\u56fe\u7b49\u7684\u53ef\u89c6\u5316\u65b9\u5f0f\u6e05\u6670\u5c55\u793a\u7edf\u8ba1\u5206\u6790\u7ed3\u679c\u3002\u4e0b\u56fe\u662f\u6765\u81eaSplunk\u5b98\u65b9\u63d0\u4f9b\u7684\u53ef\u89c6\u5316\u6587\u6863\uff1a<\/p>\n <\/p>\n \u540c\u65f6\uff0cSplunk\u8fd8\u63d0\u4f9b\u62a5\u8b66\u529f\u80fd\uff0c\u53ef\u4ee5\u5728Splunk\u91cc\u6839\u636e\u4e0d\u540c\u89c4\u5219\u8bbe\u7f6e\u5404\u79cd\u4e0d\u540c\u7684\u81ea\u52a8\u8b66\u62a5\u3002<\/p>\n Kibana<\/strong><\/p>\n ELK\u91cc\u7684Kibana\u662f\u4e13\u95e8\u9488\u5bf9Elasticsearch\u7684\u56fe\u5f62\u5316\u64cd\u4f5c\u5de5\u5177\uff0c\u80fd\u591f\u5bf9Elasticsearch\u7684\u6570\u636e\u8fdb\u884c\u68c0\u7d22\uff0c\u4e5f\u53ef\u4ee5\u5c06\u7ed3\u679c\u56fe\u793a\u5316\u5c55\u73b0\u3002\u5982\u4e0b\u56fe\u793a\uff1a<\/p>\n <\/p>\n ELK\u672c\u8eab\u53ea\u63d0\u4f9b\u57fa\u7840\u7684\u65e5\u5fd7\u7ba1\u7406\u6846\u67b6\uff0c\u81ea\u52a8\u62a5\u8b66\u529f\u80fd\u9700\u8981\u5b89\u88c5\u63d2\u4ef6\u6765\u5b9e\u73b0\u3002<\/p>\n \u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u7684\u505a\u597d\u65e5\u5fd7\u6536\u96c6\u548c\u76d1\u63a7\uff0c\u4f46\u662f\u66f4\u91cd\u8981\u7684\u662f\u9700\u8981\u4e00\u5957\u5b8c\u5584\u7684\u673a\u5236\u6765\u4fdd\u969c\u3002\u8981\u505a\u5230\u6709\u6548\u7684\u76d1\u63a7\uff0c\u52a1\u5fc5\u505a\u5230\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n \u524d\u9762\u4ecb\u7ecd\u4e86\u65e5\u5fd7\u7ba1\u7406\u7684\u76f8\u5173\u6280\u672f\u548c\u5b9e\u73b0\u65b9\u6848\uff0c\u4efb\u4f55\u5b9e\u8df5\u5bf9\u5e94\u7684\u6280\u672f\u90fd\u4e0d\u662f\u6700\u9ebb\u70e6\u7684\uff0c\u5f80\u5f80\u5b9e\u8df5\u8fc7\u7a0b\u4e2d\u9047\u5230\u7684\u4e0e\u4eba\u76f8\u5173\u7684\u95ee\u9898\u624d\u6700\u4e3a\u5173\u952e\u3002\u5bf9\u4e8e\u6d4b\u8bd5\u53f3\u79fb\u4e4b\u65e5\u5fd7\u7ba1\u7406\u5b9e\u8df5\uff0c\u8ddf\u5927\u5bb6\u7406\u89e3\u7684\u4ec5\u4ec5\u91c7\u7528\u76f8\u5173\u6280\u672f\u5b9e\u73b0\u7684\u65e5\u5fd7\u7ba1\u7406\u6709\u4f55\u4e0d\u540c\uff1f\u53c8\u5982\u4f55\u624d\u80fd\u505a\u7684\u9ad8\u6548\u5462\uff1f<\/p>\n \u672c\u6848\u4f8b\u662f\u4e00\u4e2a\u5f00\u53d1\u591a\u5e74\u7684\u7531\u5355\u4f53\u67b6\u6784\u6f14\u8fdb\u4e3a\u5fae\u670d\u52a1\u7684web\u9879\u76ee\uff0c\u968f\u7740\u5fae\u670d\u52a1\u7684\u89c4\u6a21\u5316\uff0c\u5927\u91cf\u9519\u8bef\u65e5\u5fd7\u51fa\u73b0\uff0c\u5f15\u8d77\u4e86\u56e2\u961f\u5bf9\u65e5\u5fd7\u7ba1\u7406\u7684\u91cd\u89c6\uff0c\u4ece\u6700\u521d\u7684\u8fd0\u7ef4\u4eba\u5458\u5355\u72ec\u7ba1\u7406\u65e5\u5fd7\uff0c\u5230\u540e\u6765\u7684\u6d4b\u8bd5\u4eba\u5458\u4e0e\u8fd0\u7ef4\u4eba\u5458\u901a\u529b\u5408\u4f5c\uff0c\u65e5\u5fd7\u7ba1\u7406\u5b9e\u8df5\u53d1\u751f\u4e86\u597d\u51e0\u6b21\u7684\u6f14\u8fdb\u53d8\u5316\uff0c\u4e3b\u8981\u7ecf\u5386\u4e86\u5982\u4e0b\u9636\u6bb5\uff1a<\/p>\n <\/p>\n \u5173\u4e8e\u8fd9\u4e09\u4e2a\u9636\u6bb5\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u8003\u6587\u7ae0\u300aQA\u4e0eOps\u901a\u529b\u5408\u4f5c\u6253\u9020\u53cd\u8106\u5f31\u7684\u8f6f\u4ef6\u7cfb\u7edf<\/a>\u300b\u3002<\/p>\n \u901a\u8fc7\u524d\u9762\u5bf9\u65e5\u5fd7\u6536\u96c6\u4e0e\u76d1\u63a7\u7684\u6280\u672f\u548c\u5b9e\u8df5\u4ecb\u7ecd\uff0c\u7ed3\u5408\u9879\u76ee\u65e5\u5fd7\u7ba1\u7406\u6848\u4f8b\uff0c\u603b\u7ed3\u51fa\u65e5\u5fd7\u7ba1\u7406\u7684\u9ad8\u6548\u65b9\u6848\u5305\u62ec\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n \u672c\u6587\u9996\u53d1\u4e8e\u300cBY\u6797\u5b50<\/a>\u300d\uff0c\u8f6c\u8f7d\u8bf7\u53c2\u8003\u7248\u6743\u58f0\u660e<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u672c\u6587\u5c06\u4ece\u65e5\u5fd7\u6536\u96c6\u7684\u5fc5\u8981\u6027\u3001\u65e5\u5fd7\u6536\u96c6\u65b9\u6848\u3001\u65e5\u5fd7\u76d1\u63a7\u673a\u5236\u548c\u9ad8\u6548\u65e5\u5fd7\u7ba1\u7406\u5b9e\u8df5\u51e0\u4e2a\u65b9\u9762\u8ddf\u5927\u5bb6\u4e00\u8d77\u63a2\u8ba8\u6d4b\u8bd5\u53f3\u79fb\u4e4b\u65e5\u5fd7\u6536\u96c6\u4e0e\u76d1\u63a7\u3002<\/p>\n","protected":false},"author":1,"featured_media":615,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[114],"tags":[5,61,88],"class_list":["post-469","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-testing-and-quality","tag-5","tag-61","tag-88"],"yoast_head":"\n
\n
\n\u6d4b\u8bd5\u53f3\u79fb\u76f4\u64ad\u8bfe<\/p>\n\u65e5\u5fd7\u6536\u96c6\u7684\u5fc5\u8981\u6027<\/h2>\n
\u65e5\u5fd7\u6536\u96c6\u65b9\u6848<\/h2>\n
\u65e5\u5fd7\u6536\u96c6\u75db\u70b9<\/h3>\n
\n
\u96c6\u4e2d\u65e5\u5fd7\u7ba1\u7406<\/h3>\n
\n
\u96c6\u4e2d\u65e5\u5fd7\u7ba1\u7406\u5de5\u5177<\/h3>\n
\nSplunk<\/p>\n\n
\n\u56fe\u7247\u6765\u81ea\uff1ahttp:\/\/user-images.githubusercontent.com\/30971809\/54028642-fb1e7f80-41a5-11e9-9873-1e2b6c316615.png<\/a><\/p>\n\u65e5\u5fd7\u5b58\u5728\u7684\u95ee\u9898\u4ee5\u53ca\u4f18\u5316\u65b9\u6848<\/h3>\n
\n
\n\u7ed3\u6784\u5316\u65e5\u5fd7\u793a\u4f8b<\/p>\n\u65e5\u5fd7\u76d1\u63a7\u673a\u5236<\/h2>\n
\u76d1\u63a7\u7684\u96be\u70b9<\/h3>\n
\n
\n
\n
\u65e5\u5fd7\u53ef\u89c6\u5316\u4e0e\u76d1\u63a7\u5de5\u5177<\/h3>\n
\u6709\u6548\u7684\u76d1\u63a7\u673a\u5236<\/h3>\n
\n
\u9ad8\u6548\u65e5\u5fd7\u7ba1\u7406\u5b9e\u8df5<\/h2>\n
\u9879\u76ee\u65e5\u5fd7\u7ba1\u7406\u6848\u4f8b<\/h3>\n
\n
\u9ad8\u6548\u65e5\u5fd7\u7ba1\u7406\u65b9\u6848<\/h3>\n
\n
\n