Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Docker installs zabbix4.0 monitoring system

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Instrumented zabbix.

It is easier for containers to deploy zabbix

Prepare two machines:

192.168.22.200 zabbix-server

192.168.22.8 zabbix-agent

Software version:

Docker: 18.06.1-ce

Zabbix: 4.0.1

To install docker, you can use the repo installation of the Ali mirror source:

Https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Start deploying zabbix:

Operate on 192.168.214.97:

[root@server] # mkdir-p / data/zabbix/mysql

[root@server] # chown-R mysql.mysql / data/zabbix/mysql

[root@localhost] # mkdir-p / data/zabbix/mysql

[root@localhost] # chown-R mysql:mysql / data/zabbix/mysql/

[root@localhost] # docker run-- name mysql-server-t\

-e MYSQL_DATABASE= "zabbix"\

-e MYSQL_USER= "zabbix"\

-e MYSQL_PASSWORD= "zabbix_pwd"\

-e MYSQL_ROOT_PASSWORD= "root_pwd"\

-v / data/zabbix/mysql:/var/lib/mysql\

-d mysql:5.7

[root@localhost] # 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_pwd"\-e MYSQL_ROOT_PASSWORD= "root_pwd"\-- link mysql-server:mysql\-p 10051 zabbix 10051\-d zabbix/zabbix-server-mysql:latest

[root@localhost] # 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= "zabbix_pwd"\-e MYSQL_ROOT_PASSWORD= "root_pwd"\-- link mysql-server:mysql\-- link zabbix-server-mysql:zabbix-server\-p 80:80\-d zabbix/zabbix-web-nginx-mysql:latest

Install agent on 192.168.214.99

Docker run-- name zabbix-agent\

-e ZBX_HOSTNAME= "harbor.qa.com"\

-e ZBX_SERVER_HOST= "192.168.22.200"\

-e ZBX_METADATA= "harbor"\

-p 10050Rank 10050\

-- privileged

-d zabbix/zabbix-agent:latest

Installation is complete, visit 192.168.22.200/zabbix Admin/zabbix on the browser

Create another auto-registration action to automatically register 192.168.22.8 and monitor it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report