file creation
This commit is contained in:
50
zabbix/docker-compose.yml
Normal file
50
zabbix/docker-compose.yml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
postgres-server: # The Postgres Database Service
|
||||||
|
image: postgres:13.5-alpine
|
||||||
|
restart: always
|
||||||
|
environment: # Username, password and database name variables
|
||||||
|
POSTGRES_USER: zabbix_user
|
||||||
|
POSTGRES_PASSWORD: zabbix
|
||||||
|
POSTGRES_DB: zabbix_db
|
||||||
|
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_user
|
||||||
|
POSTGRES_PASSWORD: zabbix
|
||||||
|
POSTGRES_DB: zabbix_db
|
||||||
|
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_user
|
||||||
|
POSTGRES_PASSWORD: zabbix
|
||||||
|
POSTGRES_DB: zabbix_db
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user