Skip to content

Instantly share code, notes, and snippets.

@lichti
Created December 15, 2016 14:08
Show Gist options
  • Save lichti/68cfa1f0a022870411b2faab4e978861 to your computer and use it in GitHub Desktop.
Save lichti/68cfa1f0a022870411b2faab4e978861 to your computer and use it in GitHub Desktop.
ZABBIX_PROXY=zabbix-proxy.lichti.com.br
HOSTNAME_AGENT=$(hostname --fqdn)
yum update
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
yum install zabbix-agent -y
systemctl enable zabbix-agent
cat << EOF > /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=${ZABBIX_PROXY}
ServerActive=${ZABBIX_PROXY}
Hostname=${HOSTNAME_AGENT}
Include=/etc/zabbix/zabbix_agentd.d/*.conf
EOF
systemctl start zabbix-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment