0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

zabbix 導入 docker-compose

Last updated at Posted at 2025-07-30

docker-compose.yml 部分掲載

volumes:
  zabbix-mysql-data:
  zabbix-server-data:


zabbix-mysql:
image: mysql:8.0
container_name: zabbix-mysql
environment:
  MYSQL_ROOT_PASSWORD: root_password
  MYSQL_DATABASE: zabbix
  MYSQL_USER: zabbix
  MYSQL_PASSWORD: zabbix_pass
volumes:
  - zabbix-mysql-data:/var/lib/mysql
restart: unless-stopped
command:
  - --character-set-server=utf8mb4
  - --collation-server=utf8mb4_bin
  - --default-authentication-plugin=mysql_native_password
  - --log-bin-trust-function-creators=1

zabbix-server:
image: zabbix/zabbix-server-mysql:alpine-7.0-latest
container_name: zabbix-server
environment:
  DB_SERVER_HOST: zabbix-mysql
  MYSQL_DATABASE: zabbix
  MYSQL_USER: zabbix
  MYSQL_PASSWORD: zabbix_pass
ports:
  - "10051:10051"
volumes:
  - zabbix-server-data:/var/lib/zabbix
restart: unless-stopped
depends_on:
  - zabbix-mysql

zabbix-web:
image: zabbix/zabbix-web-nginx-mysql:alpine-7.0-latest
container_name: zabbix-web
environment:
  DB_SERVER_HOST: zabbix-mysql
  MYSQL_DATABASE: zabbix
  MYSQL_USER: zabbix
  MYSQL_PASSWORD: zabbix_pass
  ZBX_SERVER_HOST: zabbix-server
  PHP_TZ: Asia/Tokyo
ports:
  - "8080:8080"
restart: unless-stopped
depends_on:
  - zabbix-server

監視対象のサーバー

$ apt -y install zabbix-agent

/etc/zabbix/zabbix_agentd.conf

Hostname=web
Server=zabbix-server
ServerActive=zabbix-server

cmd.sh

service zabbix-agent start &
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?