zabbix agent rpm安装

tee zabbix-agent.sh <<-'EOF'
#!/bin/bash
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm;
yum install -y zabbix-agent;
firewall-cmd --permanent --zone=public --add-port=10050-10051/tcp;
firewall-cmd --permanent --zone=public --add-port=10050-10051/udp; 
firewall-cmd --reload;
sed -i 's/127.0.0.1/172.17.1.12/g' /etc/zabbix/zabbix_agentd.conf;
sed -i "s/Hostname=Zabbix server/Hostname=$HOSTNAME/" /etc/zabbix/zabbix_agentd.conf;
systemctl start zabbix-agent; systemctl enable zabbix-agent;
EOF

zabbix服务端测试

zabbix_get -s ip -p 10050 -k "system.uptime"
THE END
分享
二维码
< <上一篇
下一篇>>
文章目录
关闭
目 录