Last active
January 23, 2020 11:52
-
-
Save thiago-rezende/36c00999c0e2ee17148b688f70933a6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # # # # # # # # # # # # # # # # # # # # # # # # # | |
| # *YOU'LL NEED THE FOLLOWING FOLDER STRUCTURE* # | |
| # ./ # | |
| # ├── docker-compose.yml # | |
| # └── zabbix/ # | |
| # └── alertscripts/ # | |
| # # # # # # # # # # # # # # # # # # # # # # # # # | |
| version: '3.1' | |
| services: | |
| postgres-server: # The Postgres Database Service | |
| container_name: postgres-server | |
| image: postgres:alpine | |
| restart: unless-stopped | |
| environment: # Username, password and database name variables | |
| POSTGRES_USER: zabbix | |
| POSTGRES_PASSWORD: zabbix | |
| POSTGRES_DB: zabbix | |
| PG_DATA: /var/lib/postgresql/data/pgdata #data storage | |
| zabbix-server: # The main Zabbix Server Software Service | |
| container_name: zabbix-server | |
| image: zabbix/zabbix-server-pgsql:ubuntu-latest | |
| restart: unless-stopped | |
| environment: # The Postgres database value variable | |
| POSTGRES_USER: zabbix | |
| POSTGRES_PASSWORD: zabbix | |
| POSTGRES_DB: zabbix | |
| ZBX_HISTORYSTORAGETYPES: log,text # Zabbix configuration variables | |
| ZBX_DEBUGLEVEL: 1 | |
| ZBX_HOUSEKEEPINGFREQUENCY: 1 | |
| ZBX_MAXHOUSEKEEPERDELETE: 5000 | |
| depends_on: | |
| - postgres-server | |
| volumes: # Volumes for scripts and related files you can add | |
| - alertscripts:/usr/lib/zabbix/alertscripts | |
| zabbix-web: # The main Zabbix web UI or interface | |
| container_name: zabbix-web | |
| image: zabbix/zabbix-web-nginx-pgsql:ubuntu-latest | |
| restart: unless-stopped | |
| environment: # Postgre database variables | |
| POSTGRES_USER: zabbix | |
| POSTGRES_PASSWORD: zabbix | |
| POSTGRES_DB: zabbix | |
| ZBX_SERVER_HOST: zabbix-server # Zabbix related and Php variables | |
| ZBX_POSTMAXSIZE: 64M | |
| PHP_TZ: "America/Sao_Paulo" | |
| ZBX_MAXEXECUTIONTIME: 500 | |
| depends_on: | |
| - postgres-server | |
| - zabbix-server | |
| ports: # Port where Zabbix UI is available | |
| - 8090:80 | |
| zabbix-agent: # Zabbix agent service that tracks usage and send to zabbix server | |
| container_name: zabbix-agent | |
| image: zabbix/zabbix-agent:ubuntu-latest | |
| privileged: true #access mode for allowing resource access | |
| restart: unless-stopped | |
| environment: | |
| - ZBX_SERVER_HOST=zabbix-server # the IP/Dns of Zabbix server | |
| adminer: | |
| container_name: adminer-dg | |
| image: dockette/adminer:dg | |
| restart: unless-stopped | |
| ports: | |
| - 8080:80 | |
| environment: | |
| - ADMINER_DESIGN=nette | |
| grafana-xxl: #optional more functional and creative UI | |
| container_name: grafana-xxl | |
| image: monitoringartist/grafana-xxl:latest | |
| restart: unless-stopped | |
| ports: | |
| - 3000:3000 | |
| volumes: | |
| alertscripts: | |
| driver: local | |
| driver_opts: | |
| type: none | |
| o: bind | |
| device: "${PWD}/zabbix/alertscripts" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment