監控主機配置zabbix-agent

1.安裝zabbix-agent

yum install zabbix-agent

2.配置zabbix-agent配置文件

默認在/etc/zabbix下

vim /etc/zabbix/zabbix_agentd.conf
# 被動監控
Server=zabbix-server的ip
# 主動監控
ServerActive=zabbix-server的ip
# 要和再zabbix前端配置的hostname保持一致
Hostname=自定義主機名

重啓zabbix-agent

systemctl start zabbix_agent.service

設置開機自啓

systemctl enable zabbix_agent.service

查看agent的狀態(running代表已啓動)

systemctl status zabbix_agent.service

查看agnet的log日誌

tailf /var/log/zabbix/zabbix_agentd.log

會出現

no active checks on server [zabbix-server的ip:10051]: host [你的主機名] not found

接下來配置zabbix前端

3.配置zabbix前端添加host

在這裏插入圖片描述

點擊create host
將zabbix_agentd.conf配置文件的Hostname填入Host name中,ip修改爲agent的ip,添加即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章