Skip to content

mpolinowski/zabbix-server-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zabbix Server Compose

logo

This is 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 2 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.
  4. 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.

Basic Setup

Clone the Repository

git clone https://github.com/mpolinowski/zabbix-server-compose.git

Go Dark

Zabbix Server

Change the Admin Login

Visit the Zabbix Frontend on Port 8080 and login with:

Username: Admin Password: zabbix

Enter the User Configuration and change the Admin login:

Zabbix Server

Connect the Zabbix Agent

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:

Zabbix Server

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

Zabbix Server

If everything worked the agent should show up after "a few Minutes":

Zabbix Server