-
-
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 |
Found problem.
since the latest zabbix web open port on 8080
we only need to modify below code and it will work
41 ports: # Port where Zabbix UI is available
42 - 8090:8080
$ curl http://localhost:8090 | head
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3598 100 3598 0 0 113k 0 --:--:-- --:--:-- --:--:-- 113k
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="Author" content="Zabbix SIA" />
<title>Zabbix docker: Zabbix</title>
<link rel="icon" href="favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="assets/img/apple-touch-icon-76x76-precomposed.png">
DOCKER-COMPOSE.YML FOR CENTOS7
version: '3.4'
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:centos-5.4-latest #zabbix/zabbix-server-pgsql:ubuntu-latest
restart: always
environment: # The Postgres database value variable
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: zabbix
POSTGRES_DB: zabbix
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:centos-5.4-latest #zabbix/zabbix-web-nginx-pgsql:ubuntu-latest
restart: always
environment: # Postgre database variables
POSTGRES_USER: zabbix
POSTGRES_PASSWORD: zabbix
POSTGRES_DB: zabbix
ZBX_SERVER_HOST: zabbix-server # Zabbix related and Php variables
ZBX_POSTMAXSIZE: 64M
PHP_TZ: "Europe/Moscow"
ZBX_MAXEXECUTIONTIME: 500
depends_on:
- postgres-server
- zabbix-server
ports: # Port where Zabbix UI is available
- 8090:8080
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=yourIP#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:8080
grafana-xxl: #optional more functional and creative UI
image: monitoringartist/grafana-xxl:latest
ports:
- 3000:8080 ??? is it right?
`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
`
this is great! just somehow niginx wasn't responding for some unknown reason.