zabbix3.4--agent編譯安裝

./configure --prefix=/opt/zabbix_agent/ --enable-agent
yum install pcre* -y
make&&make install
cp /root/zabbix/zabbix-3.4.15/misc/init.d/fedora/core5/zabbix_agentd /etc/init.d/
ln -s /opt/zabbix_agnet/sbin/zabbix_agentd /usr/local/sbin/
service zabbix_agentd restart
非常重要的就是加/opt/zabbix_agent 的用戶和用戶組變成zabbix

useradd -s /sbin//nologin zabbix
chown -R zabbix:zabbix zabbix_agent

修改配置文件

vim/opt/zabbix_agent/etc/zabbix_agentd.conf
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server

Server和ServerActive都指定zabbixserver的IP地址,不同的是,前者是被動後者是主動。也就是說Server這個配置是用來允許127.0.0.1這個ip來我這取數據。而serverActive的127.0.0.1的意思是,客戶端主動提交數據給他。
tail -f /tmp/zabbix_agent.log
errorno active checks on server [192.168.3.4:10051]: host [Zabbix server] not monitored
更改hostname與server一致
active check configuration update from [192.168.3.4:10051] started to fail (ZBX_TCP_READ() timed out)
註釋掉serveractive

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