{"id":11089,"date":"2022-11-10T16:11:44","date_gmt":"2022-11-10T08:11:44","guid":{"rendered":"https:\/\/www.lwops.cn\/?p=11089"},"modified":"2022-11-10T16:12:47","modified_gmt":"2022-11-10T08:12:47","slug":"zabbix%e6%8a%80%e6%9c%af%e5%88%86%e4%ba%ab-%e4%bd%bf%e7%94%a8docker-compose%e5%bf%ab%e9%80%9f%e9%83%a8%e7%bd%b2zabbix%e7%9b%91%e6%8e%a7%e7%b3%bb%e7%bb%9f","status":"publish","type":"post","link":"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089","title":{"rendered":"zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf"},"content":{"rendered":"\n

\u524d\u60c5\u63d0\u8981<\/strong><\/h3>\n\n\n\n

\u524d\u9762\u4e50\u7ef4\u541b\u6709\u63d0\u5230\u8fc7\u4f7f\u7528docker\u6765\u5feb\u901f\u62c9\u8d77\u4e00\u4e2azabbix\u76d1\u63a7\u7cfb\u7edf\uff08\u8be6\u89c1\uff1a\u5982\u4f55\u4f7f\u7528docker\u5feb\u901f\u90e8\u7f72\u4e00\u4e2azabbix\u76d1\u63a7\u7cfb\u7edf<\/u><\/a>\uff09\uff0c\u4f46\u662f\u8981\u4e00\u4e2a\u4e2a\u6267\u884cdocker\u542f\u52a8\u547d\u4ee4\u53bb\u5c06\u5bf9\u5e94\u7684\u5bb9\u5668\u542f\u52a8\u3002\u5982\u679c\u8981\u914d\u7f6e\u53c2\u6570\u591a\uff0c\u90a3\u6572\u542f\u52a8\u547d\u4ee4\u5c31\u662f\u4e00\u4ef6\u8ba9\u4eba\u5fc3\u7d2f\u7684\u4e8b\u60c5\u3002\u800c\u4e14\u6572\u5b8c\u540e\u82e5\u6ca1\u6709\u4fdd\u5b58\u542f\u52a8\u547d\u4ee4\uff0c\u540e\u9762\u7684\u7ba1\u7406\u4e5f\u662f\u6bd4\u8f83\u9ebb\u70e6\uff0c\u5e76\u4e14\u5982\u679c\u5bb9\u5668\u6570\u91cf\u8f83\u591a\uff0c\u8fd8\u8981\u4e00\u4e2a\u4e2a\u624b\u6572\u542f\u52a8\u547d\u4ee4\uff0c\u8fd9\u5c31\u975e\u5e38\u7684\u4e0d\u65b9\u4fbf\u3002<\/p>\n\n\n\n

\u6240\u4ee5\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u5e76\u4e14\u66f4\u52a0\u9ad8\u6548\u7684\u542f\u52a8\u4e00\u4e2azabbix\u76d1\u63a7\u7cfb\u7edf\u3002\u73b0\u5728\u4f7f\u7528docker-compose\u8fd9\u4e2a\u5bb9\u5668\u7f16\u6392\u5de5\u5177\u6765\u9ad8\u6548\u7684\u542f\u52a8zabbix\u76d1\u63a7\u7cfb\u7edf<\/a>\u3002<\/p>\n\n\n\n

1.\u00a0Docker-compose\u4ecb\u7ecd<\/strong><\/h3>\n\n\n\n

Docker-Compose\u9879\u76ee\u662fDocker\u5b98\u65b9\u7684\u5f00\u6e90\u9879\u76ee\uff0c\u8d1f\u8d23\u5b9e\u73b0\u5bf9Docker\u5bb9\u5668\u96c6\u7fa4\u7684\u5feb\u901f\u7f16\u6392, \u5e76\u4e14\u63d0\u4f9b\u4e86 scale (\u670d\u52a1\u6269\u5bb9) \u7684\u529f\u80fd\u3002<\/p>\n\n\n\n

Docker-Compose\u5c06\u6240\u7ba1\u7406\u7684\u5bb9\u5668\u5206\u4e3a\u4e09\u5c42\uff0c\u5206\u522b\u662f\u5de5\u7a0b\uff08project\uff09\uff0c\u670d\u52a1\uff08service\uff09\u4ee5\u53ca\u5bb9\u5668\uff08container\uff09\u3002Docker-Compose\u8fd0\u884c\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\uff08docker-compose.yml\uff0cextends\u6587\u4ef6\u6216\u73af\u5883\u53d8\u91cf\u6587\u4ef6\u7b49\uff09\u7ec4\u6210\u4e00\u4e2a\u5de5\u7a0b\uff0c\u82e5\u65e0\u7279\u6b8a\u6307\u5b9a\u5de5\u7a0b\u540d\u5373\u4e3a\u5f53\u524d\u76ee\u5f55\u540d\u3002\u4e00\u4e2a\u5de5\u7a0b\u5f53\u4e2d\u53ef\u5305\u542b\u591a\u4e2a\u670d\u52a1\uff0c\u6bcf\u4e2a\u670d\u52a1\u4e2d\u5b9a\u4e49\u4e86\u5bb9\u5668\u8fd0\u884c\u7684\u955c\u50cf\uff0c\u53c2\u6570\uff0c\u4f9d\u8d56\u3002\u4e00\u4e2a\u670d\u52a1\u5f53\u4e2d\u53ef\u5305\u62ec\u591a\u4e2a\u5bb9\u5668\u5b9e\u4f8b\uff0cDocker-Compose\u5e76\u6ca1\u6709\u89e3\u51b3\u8d1f\u8f7d\u5747\u8861\u7684\u95ee\u9898\uff0c\u56e0\u6b64\u9700\u8981\u501f\u52a9\u5176\u5b83\u5de5\u5177\u5b9e\u73b0\u670d\u52a1\u53d1\u73b0\u53ca\u8d1f\u8f7d\u5747\u8861\u3002<\/p>\n\n\n\n

Docker-Compose\u7684\u5de5\u7a0b\u914d\u7f6e\u6587\u4ef6\u9ed8\u8ba4\u4e3adocker-compose.yml\uff0c\u53ef\u901a\u8fc7\u73af\u5883\u53d8\u91cfCOMPOSE_FILE\u6216-f\u53c2\u6570\u81ea\u5b9a\u4e49\u914d\u7f6e\u6587\u4ef6\uff0c\u5176\u5b9a\u4e49\u4e86\u591a\u4e2a\u6709\u4f9d\u8d56\u5173\u7cfb\u7684\u670d\u52a1\u53ca\u6bcf\u4e2a\u670d\u52a1\u8fd0\u884c\u7684\u5bb9\u5668\u3002<\/p>\n\n\n\n

\u4f7f\u7528\u4e00\u4e2aDockerfile\u6a21\u677f\u6587\u4ef6\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u5f88\u65b9\u4fbf\u7684\u5b9a\u4e49\u4e00\u4e2a\u5355\u72ec\u7684\u5e94\u7528\u5bb9\u5668\u3002\u5728\u5de5\u4f5c\u4e2d\uff0c\u7ecf\u5e38\u4f1a\u78b0\u5230\u9700\u8981\u591a\u4e2a\u5bb9\u5668\u76f8\u4e92\u914d\u5408\u6765\u5b8c\u6210\u67d0\u9879\u4efb\u52a1\u7684\u60c5\u51b5\u3002\u4f8b\u5982\u8981\u5b9e\u73b0\u4e00\u4e2aWeb\u9879\u76ee\uff0c\u9664\u4e86Web\u670d\u52a1\u5bb9\u5668\u672c\u8eab\uff0c\u5f80\u5f80\u8fd8\u9700\u8981\u518d\u52a0\u4e0a\u540e\u7aef\u7684\u6570\u636e\u5e93\u670d\u52a1\u5bb9\u5668\uff0c\u751a\u81f3\u8fd8\u5305\u62ec\u8d1f\u8f7d\u5747\u8861\u5bb9\u5668\u7b49\u3002<\/p>\n\n\n\n

Compose\u5141\u8bb8\u7528\u6237\u901a\u8fc7\u4e00\u4e2a\u5355\u72ec\u7684docker-compose.yml\u6a21\u677f\u6587\u4ef6\uff08YAML \u683c\u5f0f\uff09\u6765\u5b9a\u4e49\u4e00\u7ec4\u76f8\u5173\u8054\u7684\u5e94\u7528\u5bb9\u5668\u4e3a\u4e00\u4e2a\u9879\u76ee\uff08project\uff09\u3002<\/p>\n\n\n\n

Docker-Compose\u9879\u76ee\u7531Python\u7f16\u5199\uff0c\u8c03\u7528Docker\u670d\u52a1\u63d0\u4f9b\u7684API\u6765\u5bf9\u5bb9\u5668\u8fdb\u884c\u7ba1\u7406\u3002\u56e0\u6b64\uff0c\u53ea\u8981\u6240\u64cd\u4f5c\u7684\u5e73\u53f0\u652f\u6301Docker API\uff0c\u5c31\u53ef\u4ee5\u5728\u5176\u4e0a\u5229\u7528Compose\u6765\u8fdb\u884c\u7f16\u6392\u7ba1\u7406\u3002<\/p>\n\n\n\n

2.\u00a0\u57fa\u7840\u8bed\u6cd5<\/strong><\/h3>\n\n\n\n

Docker-compose\u5c31\u662f\u901a\u8fc7docker-compose.yaml\u6587\u4ef6\u6240\u5b9a\u4e49\u7684\u5bb9\u5668\u4f5c\u4e3a\u4e00\u4e2a\u9879\u76ee\uff0c\u4ece\u800c\u8fdb\u884cdocker\u5bb9\u5668\u7684\u7ba1\u7406\u3002\u4e0b\u9762\u5c31\u5bf9docker-compose.yaml\u6a21\u677f\u6587\u4ef6\u7684\u5e38\u7528\u57fa\u7840\u8bed\u6cd5\u8fdb\u884c\u4e00\u4e2a\u7b80\u5355\u7684\u89e3\u91ca<\/p>\n\n\n\n

2.1.\u00a0container_name<\/strong><\/h2>\n\n\n\n

Compose \u7684\u5bb9\u5668\u9ed8\u8ba4\u540d\u79f0\u683c\u5f0f\u662f\uff1a<\u9879\u76ee\u540d\u79f0><\u670d\u52a1\u540d\u79f0><\u5e8f\u53f7><\/p>\n\n\n\n

\u867d\u7136\u53ef\u4ee5\u81ea\u5b9a\u4e49\u9879\u76ee\u540d\u79f0\u3001\u670d\u52a1\u540d\u79f0\uff0c\u4f46\u662f\u5982\u679c\u4f60\u60f3\u5b8c\u5168\u63a7\u5236\u5bb9\u5668\u7684\u547d\u540d\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u6807\u7b7e\u6307\u5b9a\uff1a<\/p>\n\n\n\n

\u6bd4\u5982\u6211\u8981\u5236\u5b9a\u4e00\u4e2amysql\u5bb9\u5668\u7684\u540d\u4e3a\u201cmysql-test\u201d,\u90a3\u4e48<\/p>\n\n\n\n

version: ‘3’<\/p>\n\n\n\n

services:<\/p>\n\n\n\n

  mysql:<\/p>\n\n\n\n

container_name: mysql-test<\/p>\n\n\n\n

2.2.\u00a0image<\/strong><\/h2>\n\n\n\n

\u6307\u5b9a\u670d\u52a1\u7684\u955c\u50cf\u540d\u79f0\u6216\u955c\u50cf ID\u3002\u5982\u679c\u955c\u50cf\u5728\u672c\u5730\u4e0d\u5b58\u5728\uff0cCompose \u5c06\u4f1a\u5c1d\u8bd5\u62c9\u53d6\u8fd9\u4e2a\u955c\u50cf\u3002<\/p>\n\n\n\n

\u6bd4\u5982\u6211\u8981\u5236\u5b9a\u4e00\u4e2amysql\u5bb9\u5668,\u4f7f\u7528\u7684\u955c\u50cf\u540d\u4e3a\u201cmysql:8.0\u201d,\u90a3\u4e48<\/p>\n\n\n\n

version: ‘3’<\/p>\n\n\n\n

services:<\/p>\n\n\n\n

  mysql:<\/p>\n\n\n\n

image: mysql:8.0<\/p>\n\n\n\n

2.3.\u00a0depends_on<\/strong><\/h2>\n\n\n\n

\u5728\u4f7f\u7528 Compose \u65f6\uff0c\u6700\u5927\u7684\u597d\u5904\u5c31\u662f\u5c11\u6253\u542f\u52a8\u547d\u4ee4\uff0c\u4f46\u662f\u4e00\u822c\u9879\u76ee\u5bb9\u5668\u542f\u52a8\u7684\u987a\u5e8f\u662f\u6709\u8981\u6c42\u7684\uff0c\u5982\u679c\u76f4\u63a5\u4ece\u4e0a\u5230\u4e0b\u542f\u52a8\u5bb9\u5668\uff0c\u5fc5\u7136\u4f1a\u56e0\u4e3a\u5bb9\u5668\u4f9d\u8d56\u95ee\u9898\u800c\u542f\u52a8\u5931\u8d25\u3002<\/p>\n\n\n\n

\u4f8b\u5982\u5728\u6ca1\u542f\u52a8\u6570\u636e\u5e93\u5bb9\u5668\u7684\u65f6\u5019\u542f\u52a8\u4e86\u5e94\u7528\u5bb9\u5668\uff0c\u8fd9\u65f6\u5019\u5e94\u7528\u5bb9\u5668\u4f1a\u56e0\u4e3a\u627e\u4e0d\u5230\u6570\u636e\u5e93\u800c\u9000\u51fa\uff0c\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\u6211\u4eec\u9700\u8981\u52a0\u5165\u4e00\u4e2a\u6807\u7b7e\uff0c\u5c31\u662f depends_on\uff0c\u8fd9\u4e2a\u6807\u7b7e\u89e3\u51b3\u4e86\u5bb9\u5668\u7684\u4f9d\u8d56\u3001\u542f\u52a8\u5148\u540e\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n

\u6bd4\u5982\u6211\u8981\u5148\u542f\u52a8\u4e00\u4e2aMySQL\uff0c\u540e\u542f\u52a8nginx\uff0c\u90a3\u4e48<\/p>\n\n\n\n

version: ‘3’<\/p>\n\n\n\n

services:<\/p>\n\n\n\n

  nginx:<\/p>\n\n\n\n

    image: nginx:1.16.1<\/p>\n\n\n\n

    depends_on:<\/p>\n\n\n\n

      – mysql<\/p>\n\n\n\n

  mysql:<\/p>\n\n\n\n

\u00a0\u00a0\u00a0\u00a0image: mysql:8.0<\/p>\n\n\n\n

2.4.\u00a0environment<\/strong><\/h2>\n\n\n\n

\u8fd9\u662f\u8bbe\u7f6e\u955c\u50cf\u7684\u73af\u5883\u53d8\u91cf\uff0c\u76f4\u63a5\u5c06\u53d8\u91cf\u5b9a\u4e49\u5230\u955c\u50cf\u91cc\u9762\uff0c\u8fd9\u6837\u542f\u52a8\u5bb9\u5668\u65f6\u4f1a\u81ea\u52a8\u8bfb\u53d6\u8be5\u73af\u5883\u53d8\u91cf<\/p>\n\n\n\n

\u5982\u542f\u52a8\u4e00\u4e2aMySQL\u5bb9\u5668\uff0c\u8981\u8bbe\u7f6e\u5b83\u7684root\u521d\u59cb\u5316\u5bc6\u7801\u4e3a\u201c123456\u201d\uff0c\u90a3<\/p>\n\n\n\n

version: ‘3’<\/p>\n\n\n\n

services:<\/p>\n\n\n\n

  mysql:<\/p>\n\n\n\n

    image: mysql:8.0<\/p>\n\n\n\n

environment:<\/p>\n\n\n\n

\u00a0\u00a0MYSQL_ROOT_PASSWORD: 123456<\/p>\n\n\n\n

2.5.\u00a0ports<\/strong><\/h2>\n\n\n\n

\u8be5\u53c2\u6570\u662f\u5c06\u5bbf\u4e3b\u673a\u7684\u7aef\u53e3\u6620\u5c04\u5230\u5bb9\u5668\u7aef\u53e3\uff0c\u4ece\u800c\u5728\u5bbf\u4e3b\u673a\u8bbf\u95ee\u5bf9\u5e94\u7684\u7aef\u53e3\u80fd\u8bbf\u95ee\u5230\u5bb9\u5668\u5185\u3002<\/p>\n\n\n\n

\u5982\u8981\u8bb2MySQL\u5bb9\u5668\u76843306\u7aef\u53e3\u6620\u5c04\u5230\u5bbf\u4e3b\u673a\u768433060\u7aef\u53e3\uff0c\u90a3<\/p>\n\n\n\n

version: ‘3’<\/p>\n\n\n\n

services:<\/p>\n\n\n\n

  mysql:<\/p>\n\n\n\n

    image: mysql:8.0<\/p>\n\n\n\n

ports:-\u201c33060:3306\u201d<\/p>\n\n\n\n

2.6.\u00a0volumes<\/strong><\/h2>\n\n\n\n

\u6302\u8f7d\u4e00\u4e2a\u76ee\u5f55\u6216\u8005\u4e00\u4e2a\u5df2\u5b58\u5728\u7684\u6570\u636e\u5377\u5bb9\u5668\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528 [HOST:CONTAINER] \u8fd9\u6837\u7684\u683c\u5f0f\uff0c\u6216\u8005\u4f7f\u7528 [HOST:CONTAINER:ro] \u8fd9\u6837\u7684\u683c\u5f0f\uff0c\u540e\u8005\u5bf9\u4e8e\u5bb9\u5668\u6765\u8bf4\uff0c\u6570\u636e\u5377\u662f\u53ea\u8bfb\u7684\uff0c\u8fd9\u6837\u53ef\u4ee5\u6709\u6548\u4fdd\u62a4\u5bbf\u4e3b\u673a\u7684\u6587\u4ef6\u7cfb\u7edf\u3002 Compose\u7684\u6570\u636e\u5377\u6307\u5b9a\u8def\u5f84\u53ef\u4ee5\u662f\u76f8\u5bf9\u8def\u5f84\uff0c\u4f7f\u7528 . \u6216\u8005 .. \u6765\u6307\u5b9a\u76f8\u5bf9\u76ee\u5f55\u3002 version: ‘3’ services: mysql: image: mysql:8.0 volumes: -.\/data:\/var\/lib\/mysql -\/var\/log\/mysql:\/var\/log\/mysql<\/p>\n\n\n\n

3.\u00a0\u5b89\u88c5docker-compose<\/strong><\/h3>\n\n\n\n

\u9009\u62e9\u5bf9\u5e94\u7248\u672c\u4e0b\u8f7d\u5b89\u88c5\u5305<\/p>\n\n\n\n

https:\/\/github.com\/docker\/compose\/releases?after=1.28.0<\/a><\/p>\n\n\n\n

\"docker\"<\/figure>\n\n\n\n

\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4fee\u6539\u540d\u79f0\u5e76\u6388\u6743<\/p>\n\n\n\n

mv docker-compose-x86 docker-compose<\/p>\n\n\n\n

chmod +x docker-compose<\/p>\n\n\n\n

\u6d4b\u8bd5<\/p>\n\n\n\n

.\/docker-compose \u2013v<\/p>\n\n\n\n

\u5b89\u88c5<\/p>\n\n\n\n

mv docker-compose \/usr\/bin<\/p>\n\n\n\n

\"docker\"<\/figure>\n\n\n\n

4.\u00a0\u7f16\u5199zabbix\u76d1\u63a7\u7cfb\u7edf\u7684docker-compose.yaml\u6587\u4ef6<\/strong><\/h3>\n\n\n\n
version: '3.7'\r\nservices:\r\n  mysql:\r\n    container_name: mysql\r\n    image: mysql:latest\r\n    restart: always\r\n    environment:\r\n      MYSQL_DATABASE: zabbix\r\n      MYSQL_ROOT_PASSWORD: zabbix@2022\r\n    ports:\r\n      - \"3306:3306\"\r\n    volumes:\r\n      - \/data\/mysql:\/var\/lib\/mysql\r\n  zabbix-server:\r\n    container_name: zabbix_server\r\n    image: zabbix\/zabbix-server-mysql:latest\r\n    restart: always\r\n    depends_on:\r\n      - mysql\r\n    environment:\r\n      MYSQL_DATABASE: zabbix\r\n      MYSQL_PASSWORD: zabbix@2022\r\n      MYSQL_USER: root\r\n      DB_SERVER_HOST: 192.168.75.31\r\n      DB_SERVER_PORT: 3306\r\n    ports:\r\n      - \"10051:10051\"\r\n    volumes:\r\n      - \/data\/zabbix\/alertscripts:\/usr\/lib\/zabbix\/alertscripts\r\n      - \/data\/zabbix\/externalscripts:\/usr\/lib\/zabbix\/externalscripts\r\n  zabbix-web:\r\n    container_name: zabbix_web\r\n    image: zabbix\/zabbix-web-nginx-mysql:latest\r\n    restart: always\r\n    depends_on:\r\n      - mysql\r\n      - zabbix_server\r\n    environment:\r\n      MYSQL_DATABASE: zabbix\r\n      MYSQL_PASSWORD: zabbix@2022\r\n      MYSQL_USER: root\r\n      DB_SERVER_HOST: 192.168.75.31\r\n      DB_SERVER_PORT: 3306\r\n      ZBX_SERVER_HOST: 192.168.75.31\r\n      ZBX_SERVER_PORT: 10051\r\n    ports:\r\n      - \"8080:8080\"\r\n  zabbix-agent:\r\n    container_name: zabbix_agent\r\n    image: zabbix\/zabbix-agent:latest\r\n    restart: always\r\n    depends_on:\r\n      - mysql\r\n      - zabbix_server\r\n    environment:\r\n      ZBX_HOSTNAME: 192.168.75.31\r\n      ZBX_SERVER_HOST: 172.18.0.1\r\n    ports:\r\n      - \"10050:10050\"<\/code><\/pre>\n\n\n\n
\"\u6570\u636e\u5e93\"<\/figure>\n\n\n\n

5.\u00a0\u542f\u52a8zabbix\u76d1\u63a7\u7cfb\u7edf<\/strong><\/h3>\n\n\n\n

\u522b\u5fd8\u4e86\u5b89\u88c5docker\uff01<\/strong><\/strong><\/p>\n\n\n\n

\u7f16\u5199\u597dzabbix\u76d1\u63a7\u7cfb\u7edf\u7684docker-compose.yaml\u6587\u4ef6\u540e\uff0c\u5c31\u53ef\u4ee5\u542f\u52a8\u7cfb\u7edf\u4e86<\/p>\n\n\n\n

Docker-compose up \u2013d<\/p>\n\n\n\n

\"docker\"<\/figure>\n\n\n\n

\u5982\u56fe\u6240\u793a\uff0c\u5df2\u6210\u529f\u542f\u52a8<\/p>\n\n\n\n

6.\u00a0\u9a8c\u8bc1\u76d1\u63a7\u7cfb\u7edf<\/strong><\/h3>\n\n\n\n

\u6211\u8fd9\u8fb9web\u7aef\u53e3\u6620\u5c04\u4e3a\u5bbf\u4e3b\u673a\u768418080\uff0c\u6240\u4ee5\u8bbf\u95eezabbix\u754c\u9762\uff0c\u90a3\u5c31\u662fIP+18080<\/p>\n\n\n\n

\u9ed8\u8ba4\u7684\u8d26\u53f7\u5bc6\u7801\uff1a<\/p>\n\n\n\n

Admin<\/p>\n\n\n\n

zabbix<\/p>\n\n\n\n

\"zabbix\"<\/figure>\n\n\n\n

\u5982\u56fe\uff0c\u6210\u529f\u8bbf\u95ee\u3002<\/p>\n\n\n\n

\u8fd9\u4e00\u671f\u7684zabbix\u6280\u672f\u5185\u5bb9\u5230\u8fd9\u5c31\u7ed3\u675f\u4e86\u3002\u6211\u662f\u4e50\u7ef4IT\u541b\uff0c\u4e13\u6ce8\u8fd0\u7ef4\u6280\u672f\u5206\u4eab\uff0c\u66f4\u591azabbix\u6280\u672f\u53ef\u4ee5\u6301\u7eed\u5173\u6ce8\u4e50\u7ef4\u5b98\u7f51zabbix\u6280\u672f\u5206\u4eab<\/a>\uff0c\u8fd8\u53ef\u4ee5\u67e5\u770b\u6211\u7684\u5f80\u671f\u5185\u5bb9\uff0czabbix\u670d\u52a1\uff0czabbix\u914d\u7f6e\uff0czabbix\u90e8\u7f72\u7b49zabbix\u670d\u52a1\u89e3\u51b3\u65b9\u6848<\/u><\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u524d\u60c5\u63d0\u8981 \u524d\u9762\u4e50\u7ef4\u541b\u6709\u63d0\u5230\u8fc7\u4f7f\u7528docker\u6765\u5feb\u901f\u62c9\u8d77\u4e00\u4e2azabbix\u76d1\u63a7\u7cfb\u7edf\uff08\u8be6\u89c1\uff1a\u5982\u4f55\u4f7f\u7528docker\u5feb\u901f […]<\/p>\n","protected":false},"author":1,"featured_media":12758,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"themepark_post_bcolor":"#f5f5f5","themepark_post_width":"1022px","themepark_post_img":"","themepark_post_img_po":"left","themepark_post_img_re":false,"themepark_post_img_cover":false,"themepark_post_img_fixed":false,"themepark_post_hide_title":false,"themepark_post_main_b":"","themepark_post_main_p":100,"themepark_paddingblock":false,"footnotes":""},"categories":[21],"tags":[255,252,223],"class_list":["post-11089","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-dockerbszabbix","tag-zabbixksbs","tag-zabbix-jkxit"],"metadata":{"_edit_lock":["1668067970:1"],"_thumbnail_id":["12758"],"_edit_last":["1"],"themepark_seo_title":["docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf"],"themepark_seo_description":["\u4f7f\u7528docker-compose\u8fd9\u4e2a\u5bb9\u5668\u7f16\u6392\u5de5\u5177\u6765\u9ad8\u6548\u7684\u542f\u52a8zabbix\u76d1\u63a7\u7cfb\u7edf"],"themepark_seo_keyword":["zabbix\u5feb\u901f\u90e8\u7f72,zabbix\u76d1\u63a7\u7cfb\u7edf,docker\u90e8\u7f72zabbix"],"catce":["sidebar-widgets4"],"_yoast_wpseo_primary_category":["21"],"_yoast_wpseo_focuskw":["\u5feb\u901f\u90e8\u7f72zabbix"],"_yoast_wpseo_linkdex":["48"],"_yoast_wpseo_content_score":["90"],"_yoast_wpseo_estimated-reading-time-minutes":[""],"_yoast_wpseo_wordproof_timestamp":[""],"views":["6516"],"ig_es_is_post_notified":["1"]},"yoast_head":"\nzabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf - \u4e50\u7ef4\u5b98\u7f51<\/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.lwops.cn\/index.php\/interflow\/technology\/11089\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf - \u4e50\u7ef4\u5b98\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u524d\u60c5\u63d0\u8981 \u524d\u9762\u4e50\u7ef4\u541b\u6709\u63d0\u5230\u8fc7\u4f7f\u7528docker\u6765\u5feb\u901f\u62c9\u8d77\u4e00\u4e2azabbix\u76d1\u63a7\u7cfb\u7edf\uff08\u8be6\u89c1\uff1a\u5982\u4f55\u4f7f\u7528docker\u5feb\u901f […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089\" \/>\n<meta property=\"og:site_name\" content=\"\u4e50\u7ef4\u5b98\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-10T08:11:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-10T08:12:47+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/lwweb.oss-cn-shenzhen.aliyuncs.com\/wp-content\/uploads\/2022\/09\/361.png\" \/>\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\":\"Article\",\"@id\":\"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/www.lwops.cn\/#\/schema\/person\/c07cbf0802c378ed4d87eaa38472b508\"},\"headline\":\"zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf\",\"datePublished\":\"2022-11-10T08:11:44+00:00\",\"dateModified\":\"2022-11-10T08:12:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089\"},\"wordCount\":234,\"publisher\":{\"@id\":\"https:\/\/www.lwops.cn\/#organization\"},\"keywords\":[\"docker\u90e8\u7f72zabbix\",\"zabbix\u5feb\u901f\u90e8\u7f72\",\"zabbix\u76d1\u63a7\u7cfb\u7edf\"],\"articleSection\":[\"Zabbix\u6280\u672f\u8d44\u6599\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089\",\"url\":\"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089\",\"name\":\"zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf - \u4e50\u7ef4\u5b98\u7f51\",\"isPartOf\":{\"@id\":\"https:\/\/www.lwops.cn\/#website\"},\"datePublished\":\"2022-11-10T08:11:44+00:00\",\"dateModified\":\"2022-11-10T08:12:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.lwops.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.lwops.cn\/#website\",\"url\":\"https:\/\/www.lwops.cn\/\",\"name\":\"\u4e50\u7ef4\u5b98\u7f51\",\"description\":\"IT\u76d1\u63a7\u7cfb\u7edf_zabbix_\u670d\u52a1\u5668\u76d1\u63a7\u8f6f\u4ef6_IT\u8fd0\u7ef4\u5e73\u53f0-\u4e50\u7ef4\",\"publisher\":{\"@id\":\"https:\/\/www.lwops.cn\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.lwops.cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.lwops.cn\/#organization\",\"name\":\"\u5e7f\u4e1c\u4e50\u7ef4\u4fe1\u606f\u79d1\u6280\u6709\u9650\u516c\u53f8\",\"url\":\"https:\/\/www.lwops.cn\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.lwops.cn\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/lwweb.oss-cn-shenzhen.aliyuncs.com\/wp-content\/uploads\/2022\/06\/b881de838f2683ee60f9b4591884ca55.svg\",\"contentUrl\":\"https:\/\/lwweb.oss-cn-shenzhen.aliyuncs.com\/wp-content\/uploads\/2022\/06\/b881de838f2683ee60f9b4591884ca55.svg\",\"caption\":\"\u5e7f\u4e1c\u4e50\u7ef4\u4fe1\u606f\u79d1\u6280\u6709\u9650\u516c\u53f8\"},\"image\":{\"@id\":\"https:\/\/www.lwops.cn\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.lwops.cn\/#\/schema\/person\/c07cbf0802c378ed4d87eaa38472b508\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.lwops.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c17976578ba7141a1c8c7dbf996183df?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c17976578ba7141a1c8c7dbf996183df?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/www.lwops.cn\"],\"url\":\"https:\/\/www.lwops.cn\/index.php\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf - \u4e50\u7ef4\u5b98\u7f51","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.lwops.cn\/index.php\/interflow\/technology\/11089","og_locale":"zh_CN","og_type":"article","og_title":"zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf - \u4e50\u7ef4\u5b98\u7f51","og_description":"\u524d\u60c5\u63d0\u8981 \u524d\u9762\u4e50\u7ef4\u541b\u6709\u63d0\u5230\u8fc7\u4f7f\u7528docker\u6765\u5feb\u901f\u62c9\u8d77\u4e00\u4e2azabbix\u76d1\u63a7\u7cfb\u7edf\uff08\u8be6\u89c1\uff1a\u5982\u4f55\u4f7f\u7528docker\u5feb\u901f […]","og_url":"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089","og_site_name":"\u4e50\u7ef4\u5b98\u7f51","article_published_time":"2022-11-10T08:11:44+00:00","article_modified_time":"2022-11-10T08:12:47+00:00","author":"admin","twitter_card":"summary_large_image","twitter_image":"https:\/\/lwweb.oss-cn-shenzhen.aliyuncs.com\/wp-content\/uploads\/2022\/09\/361.png","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089#article","isPartOf":{"@id":"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089"},"author":{"name":"admin","@id":"https:\/\/www.lwops.cn\/#\/schema\/person\/c07cbf0802c378ed4d87eaa38472b508"},"headline":"zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf","datePublished":"2022-11-10T08:11:44+00:00","dateModified":"2022-11-10T08:12:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089"},"wordCount":234,"publisher":{"@id":"https:\/\/www.lwops.cn\/#organization"},"keywords":["docker\u90e8\u7f72zabbix","zabbix\u5feb\u901f\u90e8\u7f72","zabbix\u76d1\u63a7\u7cfb\u7edf"],"articleSection":["Zabbix\u6280\u672f\u8d44\u6599"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089","url":"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089","name":"zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf - \u4e50\u7ef4\u5b98\u7f51","isPartOf":{"@id":"https:\/\/www.lwops.cn\/#website"},"datePublished":"2022-11-10T08:11:44+00:00","dateModified":"2022-11-10T08:12:47+00:00","breadcrumb":{"@id":"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.lwops.cn\/index.php\/interflow\/technology\/11089#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.lwops.cn\/"},{"@type":"ListItem","position":2,"name":"Zabbix\u6280\u672f\u5206\u4eab\u2014\u2014\u4f7f\u7528docker-compose\u5feb\u901f\u90e8\u7f72zabbix\u76d1\u63a7\u7cfb\u7edf"}]},{"@type":"WebSite","@id":"https:\/\/www.lwops.cn\/#website","url":"https:\/\/www.lwops.cn\/","name":"\u4e50\u7ef4\u5b98\u7f51","description":"IT\u76d1\u63a7\u7cfb\u7edf_zabbix_\u670d\u52a1\u5668\u76d1\u63a7\u8f6f\u4ef6_IT\u8fd0\u7ef4\u5e73\u53f0-\u4e50\u7ef4","publisher":{"@id":"https:\/\/www.lwops.cn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lwops.cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.lwops.cn\/#organization","name":"\u5e7f\u4e1c\u4e50\u7ef4\u4fe1\u606f\u79d1\u6280\u6709\u9650\u516c\u53f8","url":"https:\/\/www.lwops.cn\/","sameAs":[],"logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.lwops.cn\/#\/schema\/logo\/image\/","url":"https:\/\/lwweb.oss-cn-shenzhen.aliyuncs.com\/wp-content\/uploads\/2022\/06\/b881de838f2683ee60f9b4591884ca55.svg","contentUrl":"https:\/\/lwweb.oss-cn-shenzhen.aliyuncs.com\/wp-content\/uploads\/2022\/06\/b881de838f2683ee60f9b4591884ca55.svg","caption":"\u5e7f\u4e1c\u4e50\u7ef4\u4fe1\u606f\u79d1\u6280\u6709\u9650\u516c\u53f8"},"image":{"@id":"https:\/\/www.lwops.cn\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.lwops.cn\/#\/schema\/person\/c07cbf0802c378ed4d87eaa38472b508","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.lwops.cn\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c17976578ba7141a1c8c7dbf996183df?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c17976578ba7141a1c8c7dbf996183df?s=96&d=mm&r=g","caption":"admin"},"sameAs":["http:\/\/www.lwops.cn"],"url":"https:\/\/www.lwops.cn\/index.php\/author\/admin"}]}},"medium_url":"https:\/\/lwweb.oss-cn-shenzhen.aliyuncs.com\/wp-content\/uploads\/2023\/10\/\u5b98\u7f51\u5c01\u9762\u56fe.jpg","thumbnail_url":"https:\/\/lwweb.oss-cn-shenzhen.aliyuncs.com\/wp-content\/uploads\/2023\/10\/\u5b98\u7f51\u5c01\u9762\u56fe.jpg","full_url":"https:\/\/lwweb.oss-cn-shenzhen.aliyuncs.com\/wp-content\/uploads\/2023\/10\/\u5b98\u7f51\u5c01\u9762\u56fe.jpg","post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/posts\/11089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=11089"}],"version-history":[{"count":2,"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/posts\/11089\/revisions"}],"predecessor-version":[{"id":11096,"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/posts\/11089\/revisions\/11096"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/media\/12758"}],"wp:attachment":[{"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=11089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=11089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lwops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=11089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}