Although the Zabbix proxy log error mentioned in the title above has likely been discussed before, I thought I would drop a note into the Troubleshooting forum so others might find a solution.
Issue
"After doing a clean install of zabbix-proxy on a CentOS 6 server, all our icmpping / icmppingsec items started to return zero values." Thus, the Zabbix proxy server does not collect ICMP information from the default icmpping item (which uses the fping executable).
History
Running Centos 6.5, I started seeing log errors showing that fping was not producing output when executed by the proxy process. Nevertheless, when attempting to run the exact command (from the same log file) manually as the zabbix user, it would work, sending output to the console.
Noticing that there were no errors in the selinux log (/var/log/audit/audit.log) but that the ICMP data collection would work if selinux was disabled...
setenforce 0
...but wanting selinux to remain active, I disabled the dontaudit rules...
semodule -DB
...and saw error messages in the selinux log. Once the messages appeared, the fix was clear...
Solution (credit to PingTools.org)
At the command line, execute the following two commands:
grep fping /var/log/audit/audit.log | audit2allow -M zabbix_fping
semodule -i zabbix_fping.pp
Wait several minutes for the fping command to execute, to see whether additional selinux audit messages appear. If so, re-execute the above two commands to include the additional actions in the zabbix_fping.pp file and load them into the operational policy.
When no additional selinux audit messages related to fping appear, execute the following command to re-enable the selinux dontaudit rules...
semodule -B
...and that is it. Hopefully this forum post helps others shorten the path to the quickest solve!
Issue
"After doing a clean install of zabbix-proxy on a CentOS 6 server, all our icmpping / icmppingsec items started to return zero values." Thus, the Zabbix proxy server does not collect ICMP information from the default icmpping item (which uses the fping executable).
History
Running Centos 6.5, I started seeing log errors showing that fping was not producing output when executed by the proxy process. Nevertheless, when attempting to run the exact command (from the same log file) manually as the zabbix user, it would work, sending output to the console.
Noticing that there were no errors in the selinux log (/var/log/audit/audit.log) but that the ICMP data collection would work if selinux was disabled...
setenforce 0
...but wanting selinux to remain active, I disabled the dontaudit rules...
semodule -DB
...and saw error messages in the selinux log. Once the messages appeared, the fix was clear...
Solution (credit to PingTools.org)
At the command line, execute the following two commands:
grep fping /var/log/audit/audit.log | audit2allow -M zabbix_fping
semodule -i zabbix_fping.pp
Wait several minutes for the fping command to execute, to see whether additional selinux audit messages appear. If so, re-execute the above two commands to include the additional actions in the zabbix_fping.pp file and load them into the operational policy.
When no additional selinux audit messages related to fping appear, execute the following command to re-enable the selinux dontaudit rules...
semodule -B
...and that is it. Hopefully this forum post helps others shorten the path to the quickest solve!