-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscriptzabbixpostgre.index
60 lines (51 loc) · 1.91 KB
/
scriptzabbixpostgre.index
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
#!/bin/bash
sudo docker network create --subnet 172.20.0.0/16 --ip-range 172.20.240.0/20 rede-interna
sudo docker run --name postgres-server -t \
-e POSTGRES_USER="zabbix" \
-e POSTGRES_PASSWORD="senha" \
-e POSTGRES_DB="zabbix" \
--network=rede-interna \
--restart unless-stopped \
-d postgres:latest
sudo docker run --name zabbix-snmptraps -t \
-v /zbx_instance/snmptraps:/var/lib/zabbix/snmptraps:rw \
-v /var/lib/zabbix/mibs:/usr/share/snmp/mibs:ro \
--network=rede-interna \
-p 162:1162/udp \
--restart unless-stopped \
-d zabbix/zabbix-snmptraps:alpine-5.4-latest
sudo docker run --name zabbix-server-pgsql -it \
-e DB_SERVER_HOST="postgres-server" \
-e POSTGRES_USER="zabbix" \
-e POSTGRES_PASSWORD="senha" \
-e POSTGRES_DB="zabbix" \
-e ZBX_ENABLE_SNMP_TRAPS="true" \
-e DB_SERVER_HOST="postgres-server" \
-e POSTGRES_USER="zabbix" \
-e POSTGRES_PASSWORD="senha" \
-e POSTGRES_DB="zabbix" \
-e ZBX_ENABLE_SNMP_TRAPS="true" \
-e ZBX_STARTPOLLERS="20" \
-e ZBX_STARTPINGERS="20" \
-e ZBX_CACHESIZE="64M" \
-e ZBX_HISTORYCACHESIZE="32M" \
-e ZBX_HISTORYINDEXCACHESIZE="16M" \
-e ZBX_TRENDCACHESIZE="16M" \
-e ZBX_VALUECACHESIZE="32M" \
--network=rede-interna \
-p 10051:10051 \
--volumes-from zabbix-snmptraps \
--restart unless-stopped \
-d zabbix/zabbix-server-pgsql:alpine-5.4-latest
sudo docker run --name zabbix-web-nginx-pgsql -t \
-e ZBX_SERVER_HOST="zabbix-server-pgsql" \
-e DB_SERVER_HOST="postgres-server" \
-e POSTGRES_USER="zabbix" \
-e POSTGRES_PASSWORD="senha" \
-e POSTGRES_DB="zabbix" \
--network=rede-interna \
-p 443:8443 \
-p 80:8080 \
-v /etc/ssl/nginx:/etc/ssl/nginx:ro \
--restart unless-stopped \
-d zabbix/zabbix-web-nginx-pgsql:alpine-5.4-latest