-
Notifications
You must be signed in to change notification settings - Fork 0
/
zabbix-server_pgsql_latest_yustus.yaml
118 lines (116 loc) · 3.56 KB
/
zabbix-server_pgsql_latest_yustus.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: '3.5'
services:
zabbix-server:
image: zabbix/zabbix-server-pgsql:ubuntu-6.2-latest
ports:
- "10051:10051"
volumes:
- /etc/localtime:/etc/localtime:ro
- ./zbx_env/usr/lib/zabbix/alertscripts:/usr/lib/zabbix/alertscripts:ro
- ./zbx_env/usr/lib/zabbix/externalscripts:/usr/lib/zabbix/externalscripts:ro
- ./zbx_env/var/lib/zabbix/dbscripts:/var/lib/zabbix/dbscripts:ro
- ./zbx_env/var/lib/zabbix/export:/var/lib/zabbix/export:rw
- ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules:ro
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
- ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro
- ./zbx_env/var/lib/zabbix/mibs:/var/lib/zabbix/mibs:ro
- snmptraps:/var/lib/zabbix/snmptraps:rw
restart: always
depends_on:
- postgres-server
environment:
- 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
- ZBX_PROXYCONFIGFREQUENCY=3600
zabbix-web-nginx-pgsql:
image: zabbix/zabbix-web-nginx-pgsql:ubuntu-6.2-latest
ports:
- "80:8080"
- "443:8443"
volumes:
- /etc/localtime:/etc/localtime:ro
- ./zbx_env/etc/ssl/nginx:/etc/ssl/nginx:ro
- /etc/timezone:/etc/timezone:ro
- ./zbx_env/usr/share/zabbix/modules/:/usr/share/zabbix/modules/:ro
depends_on:
- postgres-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/ping"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
restart: always
sysctls:
- net.core.somaxconn=65535
environment:
- POSTGRES_USER=zabbix
- POSTGRES_PASSWORD=zabbix
- POSTGRES_DB=zabbixNew
- ZBX_SERVER_HOST=zabbix-server
- ZBX_POSTMAXSIZE=64M
- PHP_TZ=Europe/Moscow
- ZBX_MAXEXECUTIONTIME=500
zabbix-agent:
image: zabbix/zabbix-agent:ubuntu-6.2-latest
profiles:
- full
- all
ports:
- "10050:10050"
volumes:
- /etc/localtime:/etc/localtime:ro
- ./zbx_env/etc/zabbix/zabbix_agentd.d:/etc/zabbix/zabbix_agentd.d:ro
- ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules:ro
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro
- ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro
- /etc/timezone:/etc/timezone:ro
- /proc:/proc
- /sys:/sys
- /dev:/dev
- /var/run/docker.sock:/var/run/docker.sock
privileged: true
pid: "host"
restart: always
depends_on:
- zabbix-server
environment:
- ZBX_SERVER_HOST=zabbix-server
zabbix-snmptraps:
image: zabbix/zabbix-snmptraps:ubuntu-6.2-latest
profiles:
- full
- all
ports:
- "162:1162/udp"
volumes:
- snmptraps:/var/lib/zabbix/snmptraps:rw
restart: always
depends_on:
- zabbix-server
environment:
- ZBX_SERVER_HOST=zabbix-server
postgres-server:
image: postgres:14-alpine
# command: -c ssl=on -c ssl_cert_file=/run/secrets/server-cert.pem -c ssl_key_file=/run/secrets/server-key.pem -c ssl_ca_file=/run/secrets/root-ca.pem
restart: always
volumes:
- ./zbx_env/var/lib/postgresql/data:/var/lib/postgresql/data:rw
- ./env_vars/.ZBX_DB_CA_FILE:/run/secrets/root-ca.pem:ro
- ./env_vars/.ZBX_DB_CERT_FILE:/run/secrets/server-cert.pem:ro
- ./env_vars/.ZBX_DB_KEY_FILE:/run/secrets/server-key.pem:ro
environment:
- POSTGRES_PASSWORD=zabbix
- POSTGRES_USER=zabbix
- POSTGRES_DB=zabbixNew
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5