1、监控Linux主机

1.1、在需要被监控的Linux服务器上安装zabbix-agent以及配置

zabbix服务我在ubuntu20.04的版本apt安装zabbix5.0LTS这篇文章中实现了,这里我就基于上篇文章来监控另一个Linux主机。

root@Linux:~# wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1%2Bfocal_all.deb
root@Linux:~# dpkg -i zabbix-release_5.0-1+focal_all.deb
root@Linux:~# sed -i.bak 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/apt/sources.list.d/zabbix.list
root@Linux:~# apt update;apt -y install zabbix-agent
root@Linux:~# vim /etc/zabbix/zabbix_agentd.conf
root@Linux:~# grep '^[a-Z]' /etc/zabbix/zabbix_agentd.conf
PidFile=/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=10.0.0.100
ListenPort=10050
ListenIP=0.0.0.0
StartAgents=3
ServerActive=127.0.0.1
Hostname=10.0.0.102
Include=/etc/zabbix/zabbix_agentd.d/*.conf
root@Linux:~# systemctl restart zabbix-agent
root@Linux:~# systemctl status zabbix-agent

image.png

1.2、在zabbix的web界面添加Linux主机

image.png image.png

1.3、查看监控的Linux效果图

image.png image.png