{"id":86193,"date":"2026-07-28T08:33:14","date_gmt":"2026-07-28T00:33:14","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/86193.html"},"modified":"2026-07-28T08:33:14","modified_gmt":"2026-07-28T00:33:14","slug":"docker%e9%83%a8%e7%bd%b2lokigrafanavector%e5%ae%9e%e7%8e%b0%e5%85%a8%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%97%a5%e5%bf%97%e7%9b%91%e6%8e%a7%ef%bc%88%e5%90%abn8n-ssh-fail2ban%e7%9b%91%e6%8e%a7%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/86193.html","title":{"rendered":"Docker\u90e8\u7f72Loki+Grafana+Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7\uff08\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7\uff09"},"content":{"rendered":"<h2>Docker\u90e8\u7f72Loki&#043;Grafana&#043;Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7&#xff08;\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7&#xff09;<\/h2>\n<h3>\u4e00\u3001\u524d\u8a00<\/h3>\n<p>\u5f88\u591a\u81ea\u5efa\u670d\u52a1\u73a9\u5bb6\u3001\u670d\u52a1\u5668\u8fd0\u7ef4\u65b0\u624b&#xff0c;\u90fd\u60f3\u628a Docker\u5bb9\u5668\u65e5\u5fd7&#xff08;N8N\/Airflow\u7b49&#xff09;\u3001\u670d\u52a1\u5668SSH\u767b\u5f55\u65e5\u5fd7\u3001Fail2ban\u653b\u9632\u62e6\u622a\u65e5\u5fd7 \u7edf\u4e00\u6536\u96c6&#xff0c;\u5728Grafana\u56fe\u5f62\u754c\u9762\u96c6\u4e2d\u67e5\u770b\u3001\u68c0\u7d22\u3001\u56de\u6eaf\u3002<\/p>\n<p>\u672c\u6587\u5168\u7a0b\u5c0f\u767d\u5411&#xff0c;\u65e0\u590d\u6742\u547d\u4ee4\u3001\u65e0\u4e13\u4e1a\u672f\u8bed\u7ed5\u5f2f&#xff0c;\u624b\u628a\u624b\u6559\u4f60\u7528 Docker Compose \u4e00\u952e\u90e8\u7f72 Loki &#043; Grafana &#043; Vector&#xff0c;\u5b9e\u73b0&#xff1a;<\/p>\n<ul>\n<li>\u6240\u6709Docker\u5bb9\u5668\u65e5\u5fd7\u81ea\u52a8\u91c7\u96c6<\/li>\n<li>\u670d\u52a1\u5668SSH\u767b\u5f55\/\u5931\u8d25\u65e5\u5fd7\u6536\u96c6<\/li>\n<li>Fail2ban\u62e6\u622a\u9ed1\u5ba2\u66b4\u529b\u7834\u89e3\u65e5\u5fd7\u6536\u96c6<\/li>\n<li>Grafana\u53ef\u89c6\u5316\u68c0\u7d22\u3001\u6309\u5173\u952e\u8bcd\u8fc7\u6ee4\u3001\u6309\u65f6\u95f4\u56de\u6eaf<\/li>\n<\/ul>\n<h3>\u4e8c\u3001\u67b6\u6784\u539f\u7406<\/h3>\n<li>Vector&#xff1a;\u65e5\u5fd7\u91c7\u96c6\u642c\u8fd0\u5de5&#xff0c;\u8d1f\u8d23\u6293\u53d6\u5bb9\u5668\u65e5\u5fd7\u3001\u7cfb\u7edf\u65e5\u5fd7&#xff0c;\u8f6c\u53d1\u7ed9Loki<\/li>\n<li>Loki&#xff1a;\u65e5\u5fd7\u5b58\u50a8\u4ed3\u5e93&#xff0c;\u4e13\u95e8\u5b58\u653e\u6240\u6709\u65e5\u5fd7&#xff0c;\u4e0d\u5360\u5927\u91cf\u78c1\u76d8<\/li>\n<li>Grafana&#xff1a;\u53ef\u89c6\u5316\u9762\u677f&#xff0c;\u7528\u6765\u67e5\u8be2\u3001\u770b\u65e5\u5fd7\u3001\u505a\u76d1\u63a7\u9762\u677f<\/li>\n<p>\u7b80\u5355\u7406\u89e3&#xff1a;Vector\u6536\u65e5\u5fd7 \u2192 Loki\u5b58\u65e5\u5fd7 \u2192 Grafana\u770b\u65e5\u5fd7<\/p>\n<h3>\u4e09\u3001\u524d\u7f6e\u51c6\u5907<\/h3>\n<li>\u4e00\u53f0Linux\u4e91\u670d\u52a1\u5668&#xff08;Ubuntu\/Debian\u5747\u53ef&#xff09;<\/li>\n<li>\u5df2\u5b89\u88c5 docker \u548c docker-compose<\/li>\n<li>\u670d\u52a1\u5668\u5f00\u653e3000(Grafana)\u30013100(Loki)\u7aef\u53e3<\/li>\n<h3>\u56db\u3001\u76ee\u5f55\u51c6\u5907<\/h3>\n<p>\u65b0\u5efa\u4e13\u5c5e\u90e8\u7f72\u76ee\u5f55&#xff0c;\u540e\u7eed\u6240\u6709\u914d\u7f6e\u90fd\u653e\u8fd9\u91cc&#xff1a;<\/p>\n<p><span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> ~\/apps\/log-monitor<br \/>\n<span class=\"token builtin class-name\">cd<\/span> ~\/apps\/log-monitor<\/p>\n<h3>\u4e94\u3001\u7f16\u5199docker-compose.yml<\/h3>\n<p>\u5728 log-monitor \u76ee\u5f55\u521b\u5efa docker-compose.yml&#xff0c;\u590d\u5236\u4ee5\u4e0b\u5185\u5bb9\u76f4\u63a5\u4f7f\u7528&#xff1a;<\/p>\n<p><span class=\"token key atrule\">version<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;3.8&#034;<\/span><\/p>\n<p><span class=\"token key atrule\">services<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">loki<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> grafana\/loki<span class=\"token punctuation\">:<\/span>2.9.0<br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> loki<br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> always<br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;3100:3100&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/loki<span class=\"token punctuation\">&#8211;<\/span>data<span class=\"token punctuation\">:<\/span>\/loki<br \/>\n    <span class=\"token key atrule\">command<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">&#8211;<\/span>config.file&#061;\/etc\/loki\/local<span class=\"token punctuation\">&#8211;<\/span>config.yaml<\/p>\n<p>  <span class=\"token key atrule\">grafana<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> grafana\/grafana<span class=\"token punctuation\">:<\/span>latest<br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> grafana<br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> always<br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token string\">&#034;3000:3000&#034;<\/span><br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/grafana<span class=\"token punctuation\">&#8211;<\/span>data<span class=\"token punctuation\">:<\/span>\/var\/lib\/grafana<br \/>\n    <span class=\"token key atrule\">environment<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> GF_SECURITY_ADMIN_PASSWORD&#061;adminXXXXX<br \/>\n    <span class=\"token key atrule\">depends_on<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> loki<\/p>\n<p>  <span class=\"token key atrule\">vector<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> timberio\/vector<span class=\"token punctuation\">:<\/span>0.55.0<span class=\"token punctuation\">&#8211;<\/span>alpine<br \/>\n    <span class=\"token key atrule\">container_name<\/span><span class=\"token punctuation\">:<\/span> vector<br \/>\n    <span class=\"token key atrule\">restart<\/span><span class=\"token punctuation\">:<\/span> always<br \/>\n    <span class=\"token key atrule\">volumes<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> .\/vector.toml<span class=\"token punctuation\">:<\/span>\/etc\/vector\/vector.toml<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> \/var\/run\/docker.sock<span class=\"token punctuation\">:<\/span>\/var\/run\/docker.sock<br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> \/var\/log<span class=\"token punctuation\">:<\/span>\/host\/var\/log<span class=\"token punctuation\">:<\/span>ro<\/p>\n<p>\u8bf4\u660e&#xff1a;<\/p>\n<ul>\n<li>\u6302\u8f7d docker.sock&#xff1a;\u8ba9Vector\u80fd\u76d1\u542c\u6240\u6709Docker\u5bb9\u5668\u65e5\u5fd7<\/li>\n<li>\u6302\u8f7d \/var\/log:ro&#xff1a;\u53ea\u8bfb\u6302\u8f7d\u7cfb\u7edf\u65e5\u5fd7\u76ee\u5f55&#xff0c;\u7528\u6765\u91c7\u96c6auth.log\u3001fail2ban.log<\/li>\n<li>Grafana\u9ed8\u8ba4\u8d26\u53f7&#xff1a;admin \u5bc6\u7801&#xff1a;adminxxx&#xff0c;\u53ef\u81ea\u884c\u4fee\u6539<\/li>\n<\/ul>\n<h3>\u516d\u3001\u7f16\u5199Vector\u6838\u5fc3\u914d\u7f6e vector.toml<\/h3>\n<p>\u5728\u540c\u76ee\u5f55\u521b\u5efa vector.toml&#xff0c;\u6700\u7ec8\u7a33\u5b9a\u53ef\u7528\u7248&#xff0c;\u65e0\u8bed\u6cd5\u62a5\u9519\u3001\u65e0429\u9650\u6d41&#xff1a;<\/p>\n<p>data_dir &#061; &#034;\/var\/lib\/vector&#034;<\/p>\n<p># 1. \u91c7\u96c6\u6240\u6709Docker\u5bb9\u5668\u65e5\u5fd7<br \/>\n[sources.docker_logs]<br \/>\ntype &#061; &#034;docker_logs&#034;<br \/>\ndocker_host &#061; &#034;unix:\/\/\/var\/run\/docker.sock&#034;<\/p>\n<p># 2. \u91c7\u96c6\u670d\u52a1\u5668SSH\u767b\u5f55\u65e5\u5fd7 auth.log<br \/>\n[sources.host_auth]<br \/>\ntype &#061; &#034;file&#034;<br \/>\ninclude &#061; [&#034;\/host\/var\/log\/auth.log&#034;]<br \/>\nread_from &#061; &#034;end&#034;<\/p>\n<p># 3. \u91c7\u96c6Fail2ban\u62e6\u622a\u65e5\u5fd7<br \/>\n[sources.fail2ban]<br \/>\ntype &#061; &#034;file&#034;<br \/>\ninclude &#061; [&#034;\/host\/var\/log\/fail2ban.log&#034;]<br \/>\nread_from &#061; &#034;end&#034;<\/p>\n<p># \u8f93\u51fa\u6240\u6709\u65e5\u5fd7\u5230Loki<br \/>\n[sinks.loki]<br \/>\ntype &#061; &#034;loki&#034;<br \/>\ninputs &#061; [&#034;docker_logs&#034;, &#034;host_auth&#034;, &#034;fail2ban&#034;]<br \/>\nendpoint &#061; &#034;http:\/\/loki:3100&#034;<br \/>\nencoding.codec &#061; &#034;json&#034;<\/p>\n<p># \u56fa\u5b9a\u6807\u7b7e&#xff0c;\u4fdd\u8bc1Loki\u6b63\u5e38\u63a5\u6536<br \/>\nlabels.job &#061; &#034;vector&#034;<\/p>\n<p>\u914d\u7f6e\u5173\u952e\u70b9\u5c0f\u767d\u89e3\u91ca&#xff1a;<\/p>\n<ul>\n<li>read_from &#061; &#034;end&#034;&#xff1a;\u53ea\u91c7\u96c6\u540e\u7eed\u65b0\u4ea7\u751f\u65e5\u5fd7&#xff0c;\u4e0d\u52a0\u8f7d\u6d77\u91cf\u5386\u53f2\u65e5\u5fd7&#xff0c;\u907f\u514dLoki\u88ab\u9650\u6d41\u62a5429\u9519\u8bef<\/li>\n<li>\u4e09\u4e2a\u6570\u636e\u6e90&#xff1a;\u5bb9\u5668\u65e5\u5fd7\u3001SSH\u65e5\u5fd7\u3001Fail2ban\u65e5\u5fd7&#xff0c;\u7edf\u4e00\u53d1\u7ed9Loki<\/li>\n<\/ul>\n<h3>\u4e03\u3001\u542f\u52a8\u6574\u5957\u670d\u52a1<\/h3>\n<p>\u5728 log-monitor \u76ee\u5f55\u6267\u884c&#xff1a;<\/p>\n<p><span class=\"token function\">docker<\/span> compose up <span class=\"token parameter variable\">-d<\/span><\/p>\n<p>\u7b49\u5f851\u5206\u949f&#xff0c;\u4e09\u4e2a\u5bb9\u5668\u5168\u90e8\u540e\u53f0\u542f\u52a8\u5b8c\u6210\u3002<\/p>\n<p>\u67e5\u770bVector\u8fd0\u884c\u65e5\u5fd7&#xff0c;\u786e\u8ba4\u65e0\u62a5\u9519&#xff1a;<\/p>\n<p><span class=\"token function\">docker<\/span> compose logs <span class=\"token parameter variable\">-f<\/span> vector<\/p>\n<p>\u51fa\u73b0 Healthcheck passed \u5373\u4e3a\u6b63\u5e38\u542f\u52a8\u3002<\/p>\n<h3>\u516b\u3001\u914d\u7f6eGrafana\u5bf9\u63a5Loki<\/h3>\n<li>\u6d4f\u89c8\u5668\u8bbf\u95ee&#xff1a;\u670d\u52a1\u5668IP:3000<\/li>\n<li>\u8d26\u53f7 admin&#xff0c;\u5bc6\u7801 admin123456<\/li>\n<li>\u5de6\u4fa7\u83dc\u5355 \u2192 Connections \u2192 Data sources<\/li>\n<li>\u70b9\u51fb Add data source \u2192 \u9009\u62e9 Loki<\/li>\n<li>URL\u586b\u5199&#xff1a;http:\/\/loki:3100<\/li>\n<li>\u62c9\u5230\u6700\u4e0b\u65b9 \u2192 Save &amp; test&#xff0c;\u663e\u793a\u6210\u529f\u5373\u53ef<\/li>\n<h3>\u4e5d\u3001\u65e5\u5e38\u65e5\u5fd7\u67e5\u8be2\u7528\u6cd5&#xff08;\u5c0f\u767d\u76f4\u63a5\u590d\u5236&#xff09;<\/h3>\n<p>\u8fdb\u5165Grafana\u5de6\u4fa7 Explore&#xff0c;\u6570\u636e\u6e90\u9009Loki&#xff0c;\u76f4\u63a5\u7528\u4e0b\u9762\u8bed\u53e5\u67e5\u8be2&#xff1a;<\/p>\n<h4>1. \u67e5\u770b\u6240\u6709\u91c7\u96c6\u7684\u65e5\u5fd7<\/h4>\n<p>{job&#061;&#034;vector&#034;}<\/p>\n<h4>2. \u53ea\u770bN8N\u5bb9\u5668\u65e5\u5fd7<\/h4>\n<p>{container&#061;&#034;n8n&#034;}<\/p>\n<h4>3. \u53ea\u770bSSH\u767b\u5f55\u3001\u767b\u5f55\u5931\u8d25\u65e5\u5fd7<\/h4>\n<p>{job&#061;&#034;vector&#034;} |&#061; &#034;sshd&#034;<\/p>\n<h4>4. \u53ea\u770bFail2ban\u9ed1\u5ba2\u62e6\u622a\u3001\u5c01\u7981IP\u65e5\u5fd7<\/h4>\n<p>{job&#061;&#034;vector&#034;} |&#061; &#034;fail2ban&#034;<\/p>\n<h3>\u5341\u3001\u5e38\u89c1\u95ee\u9898\u907f\u5751&#xff08;\u5168\u7a0b\u8e29\u5751\u603b\u7ed3&#xff09;<\/h3>\n<h4>\u95ee\u98981&#xff1a;Grafana\u6253\u5f00\u65e5\u5fd7\u4e00\u7247\u7a7a\u767d&#xff0c;\u660e\u660eVector\u5df2\u91c7\u96c6<\/h4>\n<p>\u539f\u56e0&#xff1a;Grafana\u9ed8\u8ba4\u53ea\u663e\u793a\u524d1000\u884c&#xff0c;Docker\u5bb9\u5668\u65e5\u5fd7\u592a\u591a&#xff0c;\u628a\u7cfb\u7edf\u65e5\u5fd7\u6324\u6ca1\u4e86<br \/>\n\u89e3\u51b3&#xff1a;<\/p>\n<li>\u53f3\u4e0a\u89d2Limit\u9ed8\u8ba41000&#xff0c;\u6539\u621010000<\/li>\n<li>\u4e0d\u7528\u5168\u91cf\u67e5\u8be2&#xff0c;\u76f4\u63a5\u7528 |&#061; &#034;\u5173\u952e\u8bcd&#034; \u8fc7\u6ee4<\/li>\n<h4>\u95ee\u98982&#xff1a;Vector\u62a5 429 Too Many Requests<\/h4>\n<p>\u539f\u56e0&#xff1a;\u4e00\u6b21\u6027\u8bfb\u53d6\u6d77\u91cf\u5386\u53f2\u65e5\u5fd7&#xff0c;Loki\u9650\u6d41\u62d2\u7edd<br \/>\n\u89e3\u51b3&#xff1a;\u914d\u7f6e\u91cc\u7edf\u4e00\u7528 read_from &#061; &#034;end&#034; \u53ea\u6536\u96c6\u65b0\u65e5\u5fd7&#xff0c;\u4e0d\u52a0\u8f7d\u5386\u53f2<\/p>\n<h4>\u95ee\u98983&#xff1a;\u770b\u4e0d\u5230Fail2ban\/SSH\u65e5\u5fd7&#xff0c;Vector\u80fd\u8bfb\u5230\u6587\u4ef6\u4f46\u4e0d\u663e\u793a<\/h4>\n<p>\u539f\u56e01&#xff1a;\u65e5\u5fd7\u6587\u4ef6\u6743\u9650\u9650\u5236&#xff0c;Vector\u65e0\u8bfb\u53d6\u6743\u9650<br \/>\n\u6267\u884c\u547d\u4ee4\u5f00\u653e\u6743\u9650&#xff1a;<\/p>\n<p><span class=\"token function\">sudo<\/span> <span class=\"token function\">chmod<\/span> <span class=\"token number\">644<\/span> \/var\/log\/auth.log \/var\/log\/fail2ban.log<\/p>\n<p>\u539f\u56e02&#xff1a;\u6df7\u7528\u52a8\u6001\u6807\u7b7e\u6a21\u677f&#xff0c;Loki\u89e3\u6790\u5931\u8d25<br \/>\n\u89e3\u51b3&#xff1a;\u76f4\u63a5\u7528\u672c\u6587\u6781\u7b80\u914d\u7f6e&#xff0c;\u4e0d\u641e\u590d\u6742\u6807\u7b7e\u6a21\u677f&#xff0c;\u53ea\u7528\u56fa\u5b9a job&#061;&#034;vector&#034;<\/p>\n<h4>\u95ee\u98984&#xff1a;Vector\u914d\u7f6e\u6587\u4ef6\u62a5TOML\u8bed\u6cd5\u9519\u8bef<\/h4>\n<p>\u539f\u56e0&#xff1a;\u7f29\u8fdb\u3001\u5192\u53f7\u683c\u5f0f\u4e0d\u5bf9<br \/>\n\u89e3\u51b3&#xff1a;\u76f4\u63a5\u590d\u5236\u672c\u6587\u5b8c\u6574 vector.toml&#xff0c;\u4e0d\u8981\u624b\u52a8\u6539\u683c\u5f0f<\/p>\n<h3>\u5341\u4e00\u3001\u4f7f\u7528\u603b\u7ed3<\/h3>\n<li>\u6574\u5957\u67b6\u6784\u4e00\u6761\u547d\u4ee4\u542f\u52a8&#xff0c;\u65e0\u9700\u590d\u6742\u5b89\u88c5<\/li>\n<li>\u81ea\u52a8\u5168\u8986\u76d6&#xff1a;Docker\u5bb9\u5668\u65e5\u5fd7 &#043; SSH\u5b89\u5168\u65e5\u5fd7 &#043; Fail2ban\u653b\u9632\u65e5\u5fd7<\/li>\n<li>\u4e0d\u7528\u767b\u5f55\u670d\u52a1\u5668\u770b\u65e5\u5fd7&#xff0c;\u6d4f\u89c8\u5668\u968f\u65f6\u968f\u5730\u68c0\u7d22\u3001\u56de\u6eaf<\/li>\n<li>\u53ea\u9700\u590d\u5236\u914d\u7f6e&#xff0c;\u65e0\u9700\u61c2\u65e5\u5fd7\u539f\u7406\u5373\u53ef\u843d\u5730\u4f7f\u7528<\/li>\n<li>\u907f\u5f00\u4e86429\u9650\u6d41\u3001\u6807\u7b7e\u89e3\u6790\u3001\u884c\u6570\u9650\u5236\u3001\u6743\u9650\u4e0d\u8db3\u7b49\u6240\u6709\u5751<\/li>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>Docker\u90e8\u7f72LokiGrafanaVector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7&#xff08;\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7&#xff09;<br \/>\n\u4e00\u3001\u524d\u8a00<br \/>\n\u5f88\u591a\u81ea\u5efa\u670d\u52a1\u73a9\u5bb6\u3001\u670d\u52a1\u5668\u8fd0\u7ef4\u65b0\u624b&#xff0c;\u90fd\u60f3\u628a Docker\u5bb9\u5668\u65e5\u5fd7&#xff08;N8N\/Airflow\u7b49&#xff09;\u3001\u670d\u52a1\u5668SSH\u767b\u5f55\u65e5\u5fd7\u3001Fail2ban\u653b\u9632\u62e6\u622a\u65e5\u5fd7 \u7edf\u4e00\u6536\u96c6&#xff0c;\u5728Grafana\u56fe\u5f62\u754c\u9762\u96c6\u4e2d\u67e5\u770b\u3001\u68c0\u7d22\u3001\u56de\u6eaf\u3002<br \/>\n\u672c\u6587\u5168\u7a0b\u5c0f\u767d\u5411&#xff0c;\u65e0\u590d\u6742\u547d\u4ee4\u3001\u65e0\u4e13\u4e1a\u672f\u8bed\u7ed5\u5f2f&amp;#xff0c<\/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":[27,1647,43],"topic":[],"class_list":["post-86193","post","type-post","status-publish","format-standard","hentry","category-server","tag-docker","tag-grafana","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Docker\u90e8\u7f72Loki+Grafana+Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7\uff08\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7\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\/86193.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker\u90e8\u7f72Loki+Grafana+Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7\uff08\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Docker\u90e8\u7f72LokiGrafanaVector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7&#xff08;\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7&#xff09; \u4e00\u3001\u524d\u8a00 \u5f88\u591a\u81ea\u5efa\u670d\u52a1\u73a9\u5bb6\u3001\u670d\u52a1\u5668\u8fd0\u7ef4\u65b0\u624b&#xff0c;\u90fd\u60f3\u628a Docker\u5bb9\u5668\u65e5\u5fd7&#xff08;N8N\/Airflow\u7b49&#xff09;\u3001\u670d\u52a1\u5668SSH\u767b\u5f55\u65e5\u5fd7\u3001Fail2ban\u653b\u9632\u62e6\u622a\u65e5\u5fd7 \u7edf\u4e00\u6536\u96c6&#xff0c;\u5728Grafana\u56fe\u5f62\u754c\u9762\u96c6\u4e2d\u67e5\u770b\u3001\u68c0\u7d22\u3001\u56de\u6eaf\u3002 \u672c\u6587\u5168\u7a0b\u5c0f\u767d\u5411&#xff0c;\u65e0\u590d\u6742\u547d\u4ee4\u3001\u65e0\u4e13\u4e1a\u672f\u8bed\u7ed5\u5f2f&amp;#xff0c\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/86193.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-28T00:33:14+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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/86193.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/86193.html\",\"name\":\"Docker\u90e8\u7f72Loki+Grafana+Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7\uff08\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-28T00:33:14+00:00\",\"dateModified\":\"2026-07-28T00:33:14+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/86193.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/86193.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/86193.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docker\u90e8\u7f72Loki+Grafana+Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7\uff08\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7\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":"Docker\u90e8\u7f72Loki+Grafana+Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7\uff08\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7\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\/86193.html","og_locale":"zh_CN","og_type":"article","og_title":"Docker\u90e8\u7f72Loki+Grafana+Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7\uff08\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Docker\u90e8\u7f72LokiGrafanaVector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7&#xff08;\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7&#xff09; \u4e00\u3001\u524d\u8a00 \u5f88\u591a\u81ea\u5efa\u670d\u52a1\u73a9\u5bb6\u3001\u670d\u52a1\u5668\u8fd0\u7ef4\u65b0\u624b&#xff0c;\u90fd\u60f3\u628a Docker\u5bb9\u5668\u65e5\u5fd7&#xff08;N8N\/Airflow\u7b49&#xff09;\u3001\u670d\u52a1\u5668SSH\u767b\u5f55\u65e5\u5fd7\u3001Fail2ban\u653b\u9632\u62e6\u622a\u65e5\u5fd7 \u7edf\u4e00\u6536\u96c6&#xff0c;\u5728Grafana\u56fe\u5f62\u754c\u9762\u96c6\u4e2d\u67e5\u770b\u3001\u68c0\u7d22\u3001\u56de\u6eaf\u3002 \u672c\u6587\u5168\u7a0b\u5c0f\u767d\u5411&#xff0c;\u65e0\u590d\u6742\u547d\u4ee4\u3001\u65e0\u4e13\u4e1a\u672f\u8bed\u7ed5\u5f2f&amp;#xff0c","og_url":"https:\/\/www.wsisp.com\/helps\/86193.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-28T00:33:14+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/86193.html","url":"https:\/\/www.wsisp.com\/helps\/86193.html","name":"Docker\u90e8\u7f72Loki+Grafana+Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7\uff08\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-28T00:33:14+00:00","dateModified":"2026-07-28T00:33:14+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/86193.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/86193.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/86193.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Docker\u90e8\u7f72Loki+Grafana+Vector\u5b9e\u73b0\u5168\u670d\u52a1\u5668\u65e5\u5fd7\u76d1\u63a7\uff08\u542bN8N\/SSH\/Fail2ban\u76d1\u63a7\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\/86193","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=86193"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/86193\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=86193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=86193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=86193"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=86193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}