This is a fork of the official Zabbix Server Repo with a few changes for a production setup:
Changes
- 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 2 to monitor the server itself.
- 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 default127.0.0.1
to172.16.239
.106 inside the Server Dashboard! see below). - 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 manuallydocker network create ingress_gateway
before starting the containers. - OPTIONAL: Added Grafana dashboard. See Blog Entry for details. The Grafana container is commented out in the docker-compose file - add as required.
This is the updated setup guide for Zabbix Server v6 LTS via docker-compose. For a setup guide for the Version 5.4 check the 5.4 README. Also note that the docker_compose.yml file and env_vars/.env_agent had to be modified for version 6.
git clone https://github.com/mpolinowski/zabbix-server-compose.git
Visit the Zabbix Frontend on Port 8080
and login with:
Username: Admin Password: zabbix
Enter the User Configuration and change the Admin
login:
The Zabbix Server expects an agent to be running on localhost
. Since we are inside the Docker virtual network we need to change the default setting:
Go to Configuration / Hosts and change the Zabbix Agent IP / DDNS address according to the configuration you defined inside the docker-compose.yml
file:
networks:
zbx_net_backend:
ipv4_address: 172.16.239.103
aliases:
- zabbix-agent
If everything worked the agent should show up after "a few Minutes":