zabbix 邮件报错
配置邮件时候 提示:
Support for SMTP authentication was not compiled in;
查了很多资料 ,curl版本过低:curl -V 显示版本 7.19 最低 7.20
首先升级curl:
#rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm
#yum install libcurl
如果报错 libcurl XXX的话,需要这样:
#rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/libnghttp2-1.6.0-1.el6.1.x86_64.rpm
#yum install libnghttp2
然后重点:重新编译安装zabbix
cd /usr/local/zabbix-3.x
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
make & make install
修改后还是不能发出去:
因为本机商缺少mailx 和sendmail
yum install +这两个包 就好
测试一下
echo "this is a test mail" |mail -s "zabbix" 140xxxxx @qq.com
成功接收到了
然后配置邮件和触发器
可选方式
用户下点击
在配置动作 中配置触发器:记得* 添加*
然后 我们测试一下 在/boot下创建一个测试的文件:
dd if=/dev/zero of=test.img bs=1M count=500
发告警 后面告警邮件显示已经发出
推荐阅读: