Skip to main content

Zabbix Docker-Compose Setup

Guangzhou, China

Update to Version 6

Zabbix Server 5.4

Github Repository

Docker Compose Setup

This article is based on a fork of the official Zabbix Server Repo with a few changes for a production setup:

Changes:

  1. Removed everything I don't need - this file only sets up the Zabbix Server with a Postgres backend, the Zabbix Server Dashboard frontend using NGINX and an Zabbix Agent 1 to monitor the server itself.
  2. Added container names, container restart policies and fixed IP addresses (The Zabbix Agent Container IP is set to 172.16.239.106 - MAKE SURE to change the agent address from default 127.0.0.1 to 172.16.239.106 inside the Server Dashboard! see below).
  3. Added an additional external network ingress_gateway that will be used by the system ingress to direct traffic to Zabbix. The web frontend container opens both port 8080 and 8443 to debug the initial setup (SSL will be handled by the Ingress and is not configured on port 8443). The ports can be commented out later. Make sure to either remove the ingress_gateway from the configuration file or add it manually docker network create ingress_gateway before starting the containers.

Zabbix Agent Config

Run

Before running the compose file, check the ./env_vars files and change what needs to be changed (passwords!).

docker network create ingress_gateway
docker-compose up

Check the console output for errors and visit the Zabbix Dashboard on your server IP on port :8081.