Operations 8 min read

Quick Deployment of a Zabbix Monitoring Platform Using Docker

This article explains how to set up a Zabbix monitoring system by installing Docker, pulling necessary images, creating storage volumes, and running containers for MySQL, Zabbix server, Java gateway, web interface, and agents, providing a fast, container‑based deployment solution.

DevOps Operations Practice
DevOps Operations Practice
DevOps Operations Practice
Quick Deployment of a Zabbix Monitoring Platform Using Docker

Zabbix is a well‑known monitoring system that can monitor hardware, operating systems, databases, networks, and more, offering UI, alerts, service discovery, and other features.

Because Zabbix consists of many components, its installation can be complex; this guide shows how to quickly build a Zabbix platform using Docker containers.

Architecture

zabbix‑server: receives data from agents and provides core functions.

Database: stores monitoring data (MySQL or PostgreSQL).

zabbix‑web: UI for control and visualization.

zabbix‑java‑gateway: collects JVM metrics.

zabbix‑agent: runs on monitored hosts to collect data.

Docker installation

$ sudo yum install -y yum-utils
$ sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
$ sudo yum install docker-ce docker-ce-cli containerd.io
$ sudo systemctl start docker
$ docker version

Deploy MySQL (8.0) for Zabbix

$ docker pull mysql:8.0
$ docker volume create -d local mysql_data   # store MySQL data
$ docker volume create -d local mysql_logs   # store MySQL logs
$ docker volume create -d local mysql_conf   # store MySQL config
$ docker run --name mysql-server -t \
    -v mysql_data:/var/lib/mysql \
    -v mysql_logs:/var/log/mysql \
    -v mysql_conf:/etc/mysql \
    -e MYSQL_DATABASE="zabbix" \
    -e MYSQL_USER="zabbix" \
    -e MYSQL_PASSWORD="zabbix_pwd" \
    -e MYSQL_ROOT_PASSWORD="123456" \
    --restart=unless-stopped \
    -d mysql:8.0 \
    --character-set-server=utf8 --collation-server=utf8_bin \
    --default-authentication-plugin=mysql_native_password

Deploy Zabbix Java Gateway

$ docker pull zabbix/zabbix-java-gateway:alpine-6.2-latest
$ docker run --name zabbix-java-gateway -t \
    --restart=unless-stopped \
    -d zabbix/zabbix-java-gateway:alpine-6.2-latest

Deploy Zabbix Server (MySQL)

$ docker pull zabbix/zabbix-server-mysql:6.2-alpine-latest
$ docker volume create -d local zabbix_server
$ docker run --name zabbix-server-mysql -t \
    -v zabbix_server:/etc/zabbix \
    -e DB_SERVER_HOST="mysql-server" \
    -e MYSQL_DATABASE="zabbix" \
    -e MYSQL_USER="zabbix" \
    -e MYSQL_PASSWORD="zabbix_pwd" \
    -e MYSQL_ROOT_PASSWORD="123456" \
    -e ZBX_JAVAGATEWAY="zabbix-java-gateway" \
    --link mysql-server:mysql \
    --link zabbix-java-gateway:zabbix-java-gateway \
    --restart=unless-stopped \
    -p 10051:10051 \
    -d zabbix/zabbix-server-mysql:alpine-6.2-latest

Deploy Zabbix Web Interface (NGINX, MySQL)

$ docker pull zabbix/zabbix-web-nginx-mysql:alpine-6.2-latest
$ docker run --name zabbix-web-nginx-mysql -t \
    -e PHP_TZ="Asia/Shanghai" \
    -e ZBX_SERVER_HOST="zabbix-server-mysql" \
    -e DB_SERVER_HOST="mysql-server" \
    -e MYSQL_DATABASE="zabbix" \
    -e MYSQL_USER="zabbix" \
    -e MYSQL_PASSWORD="zabbix_pwd" \
    -e MYSQL_ROOT_PASSWORD="123456" \
    --link mysql-server:mysql \
    --link zabbix-server-mysql:zabbix-server \
    -p 80:8080 \
    --restart unless-stopped \
    -d zabbix/zabbix-web-nginx-mysql:alpine-6.2-latest

After the containers start, open a browser, go to http:// / , and log in with username Admin and password zabbix .

Deploy Zabbix Agent (Docker)

$ docker pull zabbix/zabbix-agent:alpine-6.2-latest
$ docker volume create -d local zabbix_agent
$ docker run --name zabbix-agent -t \
    -v zabbix_agent:/etc/zabbix \
    -e ZBX_HOSTNAME="host-01" \
    -e ZBX_SERVER_HOST="192.168.214.112" \
    -e ZBX_SERVER_PORT=10051 \
    -p 10050:10050 \
    --restart=unless-stopped \
    --privileged \
    -d zabbix/zabbix-agent:alpine-6.2-latest

Finally, add the host in the Zabbix web UI, configure items, and you will see monitoring data appear.

Conclusion

Container‑based deployment of Zabbix is far simpler and faster than traditional methods, and mastering Docker for such setups greatly improves efficiency when building monitoring environments.

monitoringDockerLinuxZabbixContainer Deployment
DevOps Operations Practice
Written by

DevOps Operations Practice

We share professional insights on cloud-native, DevOps & operations, Kubernetes, observability & monitoring, and Linux systems.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.