centos安装
安装zabbix-agent端比较简单
安装zabbix的官方源
rpm -ivh http://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-1.el7.noarch.rpm
yum install zabbix-agent -y
cd /etc/zabbix/
mv zabbix_agentd.conf zabbix_agentd.conf_default
cat << EOF > zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=10.52.80.112
ServerActive=10.52.80.112
Hostname=${HOSTNAME}
Include=/etc/zabbix/zabbix_agentd.d/*.conf
EOF
启动zabbix-agent并将服务开机启动
systemctl restart zabbix-agent.service
systemctl enable zabbix-agent.service
netstat -ntpl |grep 10050
cat zabbix_agentd.conf
ubuntu
安装
sudo apt-get install zabbix-agent
开机启动
update-rc.d zabbix-agent defaults 90
cd /etc/zabbix/
mv zabbix_agentd.conf zabbix_agentd.conf_default
cat << EOF > zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix-agent/zabbix_agentd.log
LogFileSize=0
Server=10.52.80.112
ServerActive=10.52.80.112
Hostname=${HOSTNAME}
Include=/etc/zabbix/zabbix_agentd.conf.d/*.conf
EOF
重启
/etc/init.d/zabbix-agent restart
netstat -ntpl
cat zabbix_agentd.conf
------------------------------------------------------------------------------------------------
#进zabbix web界面,主机--配置,选一台相似的主机,进去点完全克隆再做相应模板,监控项修改.