There are others out there using zabbix who have run into the same SElinux difficulties as myself. Many people will say “just disable SElinux”. But if you don’t want to do that, here’s how you make it work.

  1. Install the zabbix repo for yum: rpm -Uvh https://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
  2. Install the zabbix agent: yum install zabbix-agent
  3. Install the SElinux policy core utilities: yum install policycoreutils-python
  4. Edit your zabbix config file: vi /etc/zabbix/zabbix_agentd.conf
    (Yes, you have to use vi. Or else. Just learn it already. Vi is AMAZING.)
  5. Edit your zabbix systemd startup because it’s currently broken and the PID file is pointing at /run instead of /var/run: vi /usr/lib/systemd/system/zabbix-agent.service
    (Doooo itttt!)
  6. Reload systemd, the bane of all sensible unix people: systemctl daemon-reload
  7. Enable zabbix-agent: systemctl enable zabbix-agent
  8. Start and watch zabbix-agent fail: systemctl start zabbix-agent
    (There’s a reason for this)
  9. Gather the failure messages from the audit log (why 8 is necessary) and pipe it through audit2allow: grep “denied.*zabbix_agent” /var/log/audit/audit.log | audit2allow -M zabbix_agent
  10. Add the policy info to SElinux: semodule -i zabbix_agent.pp
  11. Start zabbix and make it sing: systemctl start zabbix-agent

Enjoy.