Zabbix Active Agent Conf — Amazon Linux AMI (Outdated)¶
Install packages¶
rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-2.4.8-1.el6.x86_64.rpm
rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-agent-2.4.8-1.el6.x86_64.rpm
Edit agent conf¶
Zabbix Server IP Address or Hostname:
Comment Hostname, uncomment HostnameItem:
# Restart zabbix_agentd
service zabbix-agent restart
# Enable Zabbix service
systemctl enable zabbix-agent
Install in a single command¶
rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-2.4.8-1.el6.x86_64.rpm && rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-agent-2.4.8-1.el6.x86_64.rpm && sed -i 's/127.0.0.1/$SERVERNAME/' /etc/zabbix/zabbix_agentd.conf && sed -i 's/Hostname=Zabbix server//' /etc/zabbix/zabbix_agentd.conf && sed -i 's/\#\ HostnameItem=system.hostname/HostnameItem=system.hostname/' /etc/zabbix/zabbix_agentd.conf && sed -i 's/\#\ HostMetadataItem=/HostMetadataItem=system.uname/' /etc/zabbix/zabbix_agentd.conf && chkconfig zabbix-agent on && service zabbix-agent start
Seds¶
sed -i 's/127.0.0.1/$SERVERNAME/' /etc/zabbix/zabbix_agentd.conf
sed -i 's/Hostname=Zabbix server//' /etc/zabbix/zabbix_agentd.conf
sed -i 's/\#\ HostnameItem=system.hostname/HostnameItem=system.hostname/' /etc/zabbix/zabbix_agentd.conf
sed -i 's/\#\ HostMetadataItem/HostMetadataItem=system.uname/' /etc/zabbix/zabbix_agentd.conf