Get the App
SLTechnology News&Howtos  ›  Database  › 

How to deploy Zabbix Monitoring system in Docker Container

Shulou Source: shulou.com Published: 2022-05-31 19:43:44 10月16日 Update

This article is about how to deploy Zabbix monitoring system in Docker container. Xiaobian thinks it is very practical, so share it with everyone to learn. I hope you can gain something after reading this article. Let's not say much. Let's take a look at it together with Xiaobian.

1. Install docker.

yum install -y docker

2. Start docker.

systemctl start docker

3. Install and run mysql5.7 database container. If there is no local image, it will be automatically pulled from the default docker repository. The Kubernetes Engine will run locally only after the image is pulled. The--name parameter specifies the mysql database container name as mysql-server. The-d parameter runs in the background. Some parameters are passed to create zabbix database. Set zabbix user password, root user password, and database character set as uft8.

docker run --name mysql-server -t \ -e MYSQL_DATABASE="zabbix" \ -e MYSQL_USER="zabbix" \ -e MYSQL_PASSWORD="zabbix" \ -e MYSQL_ROOT_PASSWORD="zabbix" \ -d mysql:5.7 \ --character-set-server=utf8 --collation-server=utf8_bin

4. Install and run the Zabbix server container, label latest as the latest version, use the link parameter to link the two containers to each other and associate them with the created mysql-server container, and the-p parameter maps the port 10051 of the container zabbix server service to the port 10051 of the host.

docker run --name zabbix-server-mysql -t \ -e DB_SERVER_HOST="mysql-server" \ -e MYSQL_DATABASE="zabbix" \ -e MYSQL_USER="zabbix" \ -e MYSQL_PASSWORD="zabbix" \ -e MYSQL_ROOT_PASSWORD="zabbix" \ --link mysql-server:mysql \ -p 10051:10051 \ -d zabbix/zabbix-server-mysql:latest

5. Looking at the running containers, you can see that the three containers we created are already working properly.

# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 312e0c52f548 zabbix/zabbix-web-nginx-mysql:latest "docker-entrypoint.sh" 4 minutes ago Up 4 minutes 0.0.0.0:80->80/tcp, 443/tcp zabbix-web-nginx-mysql b773b24771e1 zabbix/zabbix-server-mysql:latest "/sbin/tini -- /us... " 5 minutes ago Up 5 minutes 0.0.0.0:10051->10051/tcp zabbix-server-mysql c1b368c72db7 mysql:5.7 "docker-entrypoint... " 8 minutes ago Up 8 minutes 3306/tcp, 33060/tcp mysql-server

6. Enter the IP address in the browser to open the Zabbix login interface. You can see that zabbix docker is displayed in the upper right corner.

7. Enter the default username Admin, password zabbix login success.

The above is how to deploy Zabbix monitoring system in Docker container. Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Containers runs parameters data databases passwords users monitoring systems systems monitoring more knowledge ports articles mirrors services login input utility success Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MariaDB Huawei Docker Apple