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

你可能感兴趣的:(zabbix)