zabbix deployment, install zabbix-agent to monitor linux and windows

1. Deploy the zabbix service.

2. Install zabbix-agent to monitor linux and windows

1. Deploy zabbix service (this article is based on version 5.4)

1. Installing a virtual machine is the same as centos and Red Hat virtual machine installation, except that the user is set before installation, everything else is the same. (Change time, change language, open IP. Set root password, other users, others are default).
2. Check the yum source and change the source (because it is originally a foreign source, and it is inconvenient to download things, so it is replaced by a domestic source)
insert image description here
to check the source change
insert image description here

3. Turn off the firewall, SELINUX.
insert image description here
4. Temporarily set to warning mode to download commonly used software
insert image description here
5. Configure time synchronization.
Enter chrony, comment the third line, and add the fourth line.
insert image description here
insert image description here
Restart chrony. ,
Check the time
insert image description here
6. Restart the virtual machine and take a snapshot.
7. Check the virtual machine firewall, SELINUX.
insert image description here
8. Configure and install the yum source. insert image description here
9. Check the source situation
insert image description here
10. Change the source
insert image description here
11. Install zabbix sever /agent/ web, database.

dnf install -y zabbix-server-mysql
dnf dnf  install -y zabbix-agent2
dnf install -y zabbix-web-mysql httpd zabbix-apache-conf
dnf install -y mariadb-server


12. Start the database, initialize the database (set password, others are yes)
insert image description here
13. Log in to the database.
insert image description here
14. Configure the database

create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to  zabbix@localhost  identified by  'zabbix';

15. Package (not needed for version 5.0, but required for version 5.4)
insert image description here
16. Enter the data and view the data table.
insert image description here
17. Configure the database for zabbix server.
insert image description here

DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

18. Start the service and install the web interface.
insert image description here
Welcome interface
insert image description here
Check the environment (all OK).
insert image description here
Configure database
insert image description here
insert image description here
Select time zone, Shanghai
insert image description here
Check
insert image description here
Install
insert image description here
Login (default account: Admin password: zabbix)
insert image description here
insert image description here

Replace text, otherwise garbled characters will appear.,

[root@localhost dejavu]# mv DejaVuSans.ttf{,.bak}
[root@localhost dejavu]# mv   simfang.ttf  DejaVuSans.ttf

2. Install zabbix-agent to monitor linux and windows

1. Create another virtual machine as the server machine (I cloned it).
Download it on the server machine
insert image description here
and modify /etc/zabbix/zabbix_agent2.conf

Server=192.168.150.101     #被动模式, Zabbix-Server的IP地址,
多个地址以逗号间隔
ServerActive=192.168.150.101    #主动模式, Zabbix-Server的IP地
址,多个地址以逗号间隔
Hostname=linux-server1    #本机的Hostname,使⽤用主动模式则必须配置

Restart the service and check the port.
insert image description here
Download zabbix-get on the server machine
insert image description here
to view the running time and name.
insert image description here
Next, operate on the web page.
Add a new host
insert image description here
and apply a template
insert image description here
to view the latest data, and you can see that the monitoring has started.
insert image description here
Windows
1. First go to the official website to download the package

https://www.zabbix.com/download_agents

It is best to download the msi format, because there is no need to register or anything.

insert image description here
The following is the same as monitoring Linux, close the firewall, modify, download the package, and check the port.
Then add the host on the web, apply the template, it is best to view the graphics and the latest data. (all choose Windows)

Guess you like

Origin blog.csdn.net/balanceone/article/details/126081914