-
-
Save balvinder294/c6a9d0421d231c56bbc9b39afe10cd9f to your computer and use it in GitHub Desktop.
| version: '3.1' | |
| services: | |
| postgres-server: # The Postgres Database Service | |
| image: postgres:latest | |
| restart: always | |
| 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 | |
| image: zabbix/zabbix-server-pgsql:ubuntu-latest | |
| restart: always | |
| environment: # The Postgres database value variable | |
| POSTGRES_USER: zabbix | |
| POSTGRES_PASSWORD: zabbix | |
| POSTGRES_DB: zabbixNew | |
| 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 | |
| - /usr/lib/zabbix/alertscripts:/usr/lib/zabbix/alertscripts | |
| zabbix-web: # The main Zabbix web UI or interface | |
| image: zabbix/zabbix-web-nginx-pgsql:ubuntu-latest | |
| restart: always | |
| environment: # Postgre database variables | |
| POSTGRES_USER: zabbix | |
| POSTGRES_PASSWORD: zabbix | |
| POSTGRES_DB: zabbixNew | |
| ZBX_SERVER_HOST: zabbix-server # Zabbix related and Php variables | |
| ZBX_POSTMAXSIZE: 64M | |
| PHP_TZ: "Asia/Kolkata" | |
| 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 | |
| image: zabbix/zabbix-agent:latest | |
| privileged: true #access mode for allowing resource access | |
| network_mode: "host" | |
| restart: unless-stopped | |
| environment: | |
| - ZBX_SERVER_HOST=127.0.0.1 #the IP/Dns of Zabbix server | |
| adminer: #Optional for accessing databases | |
| image: adminer | |
| restart: always | |
| ports: | |
| - 8080:8080 | |
| grafana-xxl: #optional more functional and creative UI | |
| image: monitoringartist/grafana-xxl:latest | |
| ports: | |
| - 3000:3000 |
`version: '3.1'
services:
postgres-server: # The Postgres Database Service
image: postgres:latest
restart: always
environment: # Username, password and database name variables
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: zabbix
POSTGRES_DB: zabbixNew
PG_DATA: /var/lib/postgresql/data/pgdata #data storage
ports:
- 5432:5432
zabbix-server: # The main Zabbix Server Software Service
image: zabbix/zabbix-server-pgsql:ubuntu-latest
restart: always
environment: # The Postgres database value variable
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: zabbix
POSTGRES_DB: zabbixNew
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
- /usr/lib/zabbix/alertscripts:/usr/lib/zabbix/alertscripts
ports: # Port where Zabbix UI is available
- 1050:1050
- 1051:1051
zabbix-web: # The main Zabbix web UI or interface
image: zabbix/zabbix-web-nginx-pgsql:ubuntu-latest
restart: always
environment: # Postgre database variables
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: zabbix
POSTGRES_DB: zabbixNew
ZBX_SERVER_HOST: zabbix-server # Zabbix related and Php variables
ZBX_POSTMAXSIZE: 64M
PHP_TZ: "America/New_York"
ZBX_MAXEXECUTIONTIME: 500
depends_on:
- postgres-server
- zabbix-server
ports: # Port where Zabbix UI is available
- 8090:8080
adminer: #Optional for accessing databases
image: adminer
restart: always
ports:
- 8080:8080
`
grafana-xxl: #optional more functional and creative UI
image: monitoringartist/grafana-xxl:latest
ports: