Fixes #1986 Fixes #1994 - Updated .gitignore to include SSL certificate files. - Introduced new GitHub Actions workflows for testing compatibility with Zabbix versions 5.0, 6.0, 7.0, and 7.2. - Added integration tests for Zabbix API for each version, ensuring proper authentication and API version handling. - Updated Docker Compose files to support SSL configuration for Zabbix web services. - Removed deprecated default Docker Compose and bootstrap files. - Removed devenv for version 6.2.
154 lines
4.0 KiB
YAML
154 lines
4.0 KiB
YAML
services:
|
|
ssl-cert:
|
|
image: alpine:latest
|
|
command: |
|
|
sh -c "if [ ! -f /certs/nginx.crt ] || [ ! -f /certs/nginx.key ]; then
|
|
apk add --no-cache openssl &&
|
|
mkdir -p /certs &&
|
|
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /certs/nginx.key -out /certs/nginx.crt -subj '/C=US/ST=State/L=City/O=Organization/CN=localhost' &&
|
|
chmod 644 /certs/nginx.crt /certs/nginx.key
|
|
else
|
|
echo 'SSL certificates already exist, skipping generation'
|
|
fi"
|
|
volumes:
|
|
- ../nginx:/certs
|
|
|
|
# Grafana
|
|
grafana:
|
|
image: grafana/grafana:main
|
|
ports:
|
|
- '3001:3000'
|
|
volumes:
|
|
- ../..:/grafana-zabbix
|
|
- ../dashboards:/devenv/dashboards
|
|
- ../grafana.ini:/etc/grafana/grafana.ini:ro
|
|
- '../datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml'
|
|
- '../dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml'
|
|
|
|
# Zabbix
|
|
zabbix-server:
|
|
image: zabbix/zabbix-server-pgsql:alpine-5.0-latest
|
|
ports:
|
|
- '10051:10051'
|
|
depends_on:
|
|
- database
|
|
environment:
|
|
DB_SERVER_HOST: database
|
|
DB_SERVER_PORT: 5432
|
|
POSTGRES_USER: zabbix
|
|
POSTGRES_PASSWORD: zabbix
|
|
POSTGRES_DB: zabbix
|
|
|
|
zabbix-web:
|
|
image: zabbix/zabbix-web-nginx-pgsql:alpine-5.0-latest
|
|
ports:
|
|
- '443:443'
|
|
- '8188:8080'
|
|
depends_on:
|
|
ssl-cert:
|
|
condition: service_completed_successfully
|
|
database:
|
|
condition: service_started
|
|
zabbix-server:
|
|
condition: service_started
|
|
environment:
|
|
ZBX_SERVER_HOST: zabbix-server
|
|
ZBX_SERVER_PORT: 10051
|
|
DB_SERVER_HOST: database
|
|
DB_SERVER_PORT: 5432
|
|
POSTGRES_USER: zabbix
|
|
POSTGRES_PASSWORD: zabbix
|
|
POSTGRES_DB: zabbix
|
|
ZBX_SESSION_NAME: zbx_sessionid_new
|
|
volumes:
|
|
- ../nginx:/etc/nginx/ssl:ro
|
|
- ../nginx/default.conf:/etc/nginx/http.d/default.conf:ro
|
|
- ../nginx/.htpasswd:/etc/nginx/.htpasswd:ro
|
|
|
|
database:
|
|
image: postgres:14
|
|
ports:
|
|
- '15432:5432'
|
|
environment:
|
|
POSTGRES_USER: zabbix
|
|
POSTGRES_PASSWORD: zabbix
|
|
|
|
zabbix-agent:
|
|
image: zabbix/zabbix-agent:alpine-5.0-latest
|
|
environment:
|
|
ZBX_SERVER_HOST: zabbix-server
|
|
ZBX_SERVER_PORT: 10051
|
|
|
|
zabbix-proxy:
|
|
image: zabbix/zabbix-proxy-sqlite3:alpine-5.0-latest
|
|
environment:
|
|
ZBX_PROXYMODE: 0
|
|
ZBX_HOSTNAME: zabbix-proxy
|
|
ZBX_SERVER_HOST: zabbix-server
|
|
ZBX_SERVER_PORT: 10051
|
|
|
|
zabbix-agent-proxy:
|
|
image: zabbix/zabbix-agent:alpine-5.0-latest
|
|
environment:
|
|
ZBX_SERVER_HOST: zabbix-proxy
|
|
ZBX_SERVER_PORT: 10051
|
|
|
|
#########################################################
|
|
# Bootstrap config
|
|
#########################################################
|
|
|
|
bootstrap:
|
|
build:
|
|
context: ./bootstrap
|
|
dockerfile: Dockerfile
|
|
args:
|
|
ZBX_HOSTS_NUMBER: 10
|
|
environment:
|
|
ZBX_API_URL: http://zabbix-web:8080
|
|
ZBX_API_USER: Admin
|
|
ZBX_API_PASSWORD: zabbix
|
|
depends_on:
|
|
- database
|
|
- zabbix-server
|
|
- zabbix-web
|
|
|
|
#########################################################
|
|
# Fake agents
|
|
#########################################################
|
|
|
|
# backend
|
|
redis_backend:
|
|
image: redis:alpine
|
|
|
|
zas_backend_01:
|
|
build: ../zas-agent
|
|
volumes:
|
|
- ../zas-agent/conf/zas_scenario_backend.cfg:/etc/zas_scenario.cfg
|
|
environment:
|
|
REDIS_HOST: redis_backend
|
|
|
|
zas_backend_02:
|
|
build: ../zas-agent
|
|
volumes:
|
|
- ../zas-agent/conf/zas_scenario_backend.cfg:/etc/zas_scenario.cfg
|
|
environment:
|
|
REDIS_HOST: redis_backend
|
|
|
|
# frontend
|
|
redis_frontend:
|
|
image: redis:alpine
|
|
|
|
zas_frontend_01:
|
|
build: ../zas-agent
|
|
volumes:
|
|
- ../zas-agent/conf/zas_scenario_frontend.cfg:/etc/zas_scenario.cfg
|
|
environment:
|
|
REDIS_HOST: redis_frontend
|
|
|
|
zas_frontend_02:
|
|
build: ../zas-agent
|
|
volumes:
|
|
- ../zas-agent/conf/zas_scenario_frontend.cfg:/etc/zas_scenario.cfg
|
|
environment:
|
|
REDIS_HOST: redis_frontend
|