Files
srvdocker02_compose_files/compose_files/zabbix.yml
mindesbunister 2fad823e5f Performance: Increase database buffer pools for Nextcloud and Zabbix
- Nextcloud MariaDB: 128MB → 4GB buffer pool
- Zabbix MariaDB: 128MB → 3GB buffer pool
- Added innodb-log-file-size=512M for better write performance
- Added max-connections=200 for better concurrency
- Created performance.cnf for Zabbix with additional optimizations

Expected improvement: 3-6x faster database queries
Impact: Better responsiveness for Nextcloud and Zabbix web UI
2025-11-11 14:53:44 +01:00

125 lines
3.6 KiB
YAML
Executable File

version: '3.3'
services:
zabbix-server: # The main Zabbix Server Software Service
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
image: zabbix/zabbix-server-mysql:6.4-ubuntu-latest
container_name: zabbix-server
restart: unless-stopped
environment: # The Postgres database value variable
DB_SERVER_HOST: mysql-zabbix
MYSQL_USER: zabbix
MYSQL_PASSWORD: eccmts42*
MYSQL_DATABASE: zabbix
ZBX_HISTORYSTORAGETYPES: log,text #Zabbix configuration variables
ZBX_DEBUGLEVEL: 1
ZBX_HOUSEKEEPINGFREQUENCY: 1
ZBX_MAXHOUSEKEEPERDELETE: 5000
ports:
- "10051:10051"
depends_on:
- mysql-zabbix
links:
- mysql-zabbix
# - zabbix-postfix
volumes: # Volumes for scripts and related files you can add
- /home/icke/zabbix-server/alertscripts:/usr/lib/zabbix/alertscripts
- /home/icke/zabbix-server/externalscripts:/usr/lib/zabbix/externalscripts
- /home/icke/zabbix-server/userparameter_diskstats.conf:/etc/zabbix/zabbix_agentd.d/userparameter_diskstats.conf
- /home/icke/zabbix-server/lld-disks.py:/usr/local/bin/lld-disks.py
networks:
zabbix:
ipv4_address: 172.19.0.2
# zabbix-agent: # Zabbix agent service that tracks usage and send to zabbix server
# image: zabbix/zabbix-agent:latest
# container_name: zabbix-agent
# privileged: true #access mode for allowing resource access
# #network_mode: "host"
# links:
# - zabbix-server
# restart: unless-stopped
# environment:
# - ZBX_SERVER_HOST=172.19.0.2 #the IP/Dns of Zabbix server
# networks:
# zabbix:
# ipv4_address: 172.19.0.3
# zabbix-postfix:
# ports:
# - "25:25"
# image: catatnight/postfix
# container_name: zabbix-postfix
# environment:
# smtp_user: monitor:eccmts42*
# maildomain: mail.egonetix.de
zabbix-web: # The main Zabbix web UI or interface
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
image: zabbix/zabbix-web-nginx-mysql:6.4-ubuntu-latest
container_name: zabbix-web
restart: unless-stopped
environment: # Postgre database variables
DB_SERVER_HOST: mysql-zabbix
MYSQL_USER: zabbix
MYSQL_PASSWORD: eccmts42*
MYSQL_DATABASE: zabbix
ZBX_SERVER_HOST: zabbix-server # Zabbix related and Php variables
ZBX_POSTMAXSIZE: 64M
PHP_TZ: "Europe/Berlin"
ZBX_MAXEXECUTIONTIME: 500
links:
- mysql-zabbix
- zabbix-server
depends_on:
- mysql-zabbix
- zabbix-server
ports: # Port where Zabbix UI is available
- "8084:8080"
networks:
zabbix:
ipv4_address: 172.19.0.4
mysql-zabbix:
#image: mariadb:10.6
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
image: mysql:8.0
container_name: mysql-zabbix
# ports:
# - "6603:3306"
environment:
# - default-authentication-plugin=mysql_native_password
- MYSQL_ROOT_PASSWORD=eccmts42*
- MYSQL_DATABASE=zabbix
- MYSQL_USER=zabbix
- MYSQL_PASSWORD=eccmts42*
volumes:
- /home/icke/mysql-zabbix/var:/var/lib/mysql
- /home/icke/mysql-zabbix/performance.cnf:/etc/mysql/conf.d/performance.cnf:ro
restart: unless-stopped
networks:
zabbix:
ipv4_address: 172.19.0.5
networks:
zabbix:
driver: bridge
ipam:
config:
- subnet: 172.19.0.0/29
volumes:
zabbix-server:
zabbix-web:
mysql-zabbix:
# zabbix-postfix:
# zabbix-agent: