Zabbix server is not running alert on CentOS 6(同时解决SMTP发送失败问题)

原创地址:http://www.sysads.co.uk/2013/11/zabbix-server-running-alert/


In some occasions after installing Zabbix server, the following message gets displayed at the home screen:

Zabbix server is not running: the information displayed may not be current

zabbix-alert-01a

This issue is related to the Linux Security Module (SELinux) which is a mandatory access control (MAC) security mechanism implemented in the kernel.

To clear the alert, follow the steps outlined below:

- First confirm that SELinux is causing this by running the following command from within Linux console:

tail -f /var/log/audit/audit.log |grep -i avc

- You should see the following lines:

type=AVC msg=audit(1383850274.731:32113): avc:  denied  { name_connect } for  pid=2060 comm=”httpd” dest=10051 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket

The best and recommended option to fixing this is to add a policy to allow the connection

- Run the command “getsebool -a“. Locate the following line which should give you a value ‘–> off

httpd_can_network_connect --> off

- Run the command to turn it on

setsebool httpd_can_network_connect on

- Now run the command “getsebool httpd_can_network_connect“. The result should now indicate that the policy is now set to ON

setsebool -P httpd_can_network_connect on

Now the Zabbix alert message should disappear and also the “Zabbix server is running” value should now show ‘Yes

zabbix-alert-01

做完以上配置后,重启HTTPD服务后测试,如果仍不可发送SMTP,追加setsebool -P httpd_can_sendmail=1命令,然后重启HTTPD服务后即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值