Low Orbit Flux Logo 2 F

Docker Zabbix

Zabbix is an open source tool for monitoring servers, networks, applications, and more. Zabbix can be run in Docker! It is officially supported.

Docker Zabbix - Setup Steps

NOTE - These instructions will need tweaking before they will work correctly.

Create a MySQL database container:



docker run --name mysql-server -t \
-e MYSQL_DATABASE="zabbix" \
-e MYSQL_USER="zabbix" \
-e MYSQL_PASSWORD="Password1" \
-e MYSQL_ROOT_PASSWORD="Password1" \
-d mysql 

Create a container for the Zabbix Java Gateway:



docker run --name zabbix-java-gateway -t --restart unless-stopped -d zabbix/zabbix-java-gateway

Create a container for Zabbix Server MySQL:



docker run --name zabbix-server-mysql -t \
-e ZBX_JAVAGATEWAY="zabbix-java-gateway" \
--link zabbix-java-gateway:zabbix-java-gateway \
--link mysql-server:mysql \
-p 10051:10051 \
-e DB_SERVER_HOST="mysql-server" \
-e MYSQL_DATABASE="zabbix" \
-e MYSQL_USER="zabbix" \
-e MYSQL_PASSWORD="Password1" \
-e MYSQL_ROOT_PASSWORD="Password1" \
--restart unless-stopped \
-d zabbix/zabbix-server-mysql

Create a container for the Zabbix Web Server ( Nginx and MySQL ):



docker run --name zabbix-web-nginx-mysql -t \
-e DB_SERVER_HOST="mysql-server" \
-e MYSQL_DATABASE="zabbix" \
-e MYSQL_USER="zabbix" \
-e MYSQL_PASSWORD="Password1" \
-e MYSQL_ROOT_PASSWORD="Password1" \
--link mysql-server:mysql \
--link zabbix-server-mysql:zabbix-server -p 80:8080 \
--restart unless-stopped -d zabbix/zabbix-web-nginx-mysql

Create a container for the Zabbix Agent:



docker run --name zabbix-agent \
--link mysql-server:mysql \
--link zabbix-server-mysql:zabbix-server \
-e ZBX_SERVER_HOST="zabbix-server" \
-e ZBX_HOSTNAME="Zabbix server" \
-d zabbix/zabbix-agent

Navigate to your IP address in a browser.

Use the following default username and password:

Admin
zabbix