IT

centos7에 zabbix 설치 / docker-compose 이용

version: '3.3'

services:
  postgres-server:
    container_name: postgres-server
    image: postgres:13.0-alpine
    restart: always
    environment:  
      POSTGRES_USER: zabbix
      POSTGRES_PASSWORD: passwd!Q
      POSTGRES_DB: zabbix
      PG_DATA: /var/lib/postgresql/data/pgdata

  zabbix-server:
    container_name: zabbix-server
    image: zabbix/zabbix-server-pgsql:ubuntu-5.4.9
    restart: always
    environment:
      POSTGRES_USER: zabbix
      POSTGRES_PASSWORD: passwd!Q
      POSTGRES_DB: zabbix
      ZBX_HISTORYSTORAGETYPES: log,text
      ZBX_DEBUGLEVEL: 1
      ZBX_HOUSEKEEPINGFREQUENCY: 1
      ZBX_MAXHOUSEKEEPERDELETE: 5000
    depends_on:
      - postgres-server
    volumes:
      - ./volumes/zabbix/alertscripts:/usr/lib/zabbix/alertscripts
    ports:
      - '10051:10051'

  zabbix-frontend:
    container_name: zabbix-frontend
    image: zabbix/zabbix-web-nginx-pgsql:ubuntu-5.4.9
    restart: always
    ports:
      - '80:8080'
    environment:
      POSTGRES_USER: zabbix
      POSTGRES_PASSWORD: passwd!Q
      POSTGRES_DB: zabbix
      ZBX_SERVER_HOST: zabbix-server
      ZBX_POSTMAXSIZE: 64M
      PHP_TZ: "Asia/Seoul"  
      ZBX_MAXEXECUTIONTIME: 500
    depends_on:
      - postgres-server
      - zabbix-server

  zabbix-agent:
    container_name: zabbix-agent
    image: zabbix/zabbix-agent:latest
    privileged: true
    restart: unless-stopped
    environment:
      - ZBX_SERVER_HOST=zabbix-server

  grafana:
    container_name: grafana
    image: grafana/grafana
    restart: always
    ports:
      - '3000:3000'
    environment: 
      - GF_INSTALL_PLUGINS=alexanderzobnin-zabbix-app
    depends_on:
      - postgres-server
      - zabbix-server

아무 상관없이 그냥 도커컴포즈로 만들어서 실행만 시키면 끝!

docker-compose up -d

Published by ilikeafrica

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다