zabbix agent rpm安装

  • A+
所属分类:Linux
tee zabbix-agent.sh <<-'EOF'
#!/bin/bash
rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.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"
avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: