Deploy Zabbix Agent client installation and configuration detailed graphic tutorials under Linux system

Deploy Zabbix Agent agent client installation and configuration detailed graphic tutorial under Linux system

1. Turn off the firewall and core protection

#永久关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
#临时关闭核心保护
setenforce 0

2. Deploy zabbix agent

#获取包
rpm -i https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
#yum安装
yum install -y zabbix-agent

3. Modify the zabbix agent configuration file

The directory where the configuration file is located is /etc/zabbix

cd  /etc/zabbix/
vi  zabbix_agentd.conf

Modify the content of the configuration file


PidFile=/var/run/zabbix/zabbix_agentd.pid   #13行
LogFile=/var/log/zabbix/zabbix_agentd.log   #32行
LogFileSize=0                               #43行
Server=192.168.153.40						#98行修改,指向监控服务器
#Zabbix Server端的ip
ServerActive=192.168.153.40					#139行修改,指向监控服务器
#Zabbix Server端的ip
Hostname=test                			    #150行,指定名称
#Hostname填写要监控的主机名,Server才能根据名字找到它(此处hostname要与zabbix监控当中添加主机的主机名一致)
Include=/etc/zabbix/zabbix_agentd.d/*.conf  #268行

4. Open the zabbix agent service


systemctl start zabbix-agent             #启动服务
systemctl enable zabbix-agent            #设置自启动
netstat -natp | grep zabbix				#查看10050端口

insert image description here

5. Monitoring verification

Add monitored host

On the zabbix graphics page - configuration - host - create a host
(define the host name, add a group, fill in the IP address of the monitored host)

insert image description here

Add a template to monitor the template on the agent side

insert image description here

Then we stopped the agent service just now to see if there will be an alarm

It can be seen that when the agent is stopped, an alarm will appear, indicating that there is no problem.

insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/qq_42716761/article/details/126996276