zabbix设置邮件告警(详细图解)


[[email protected] ~]# cat /etc/hosts
127.0.0.1 monit.com localhost.localdomain localhost

[[email protected] ~]# cat /etc/mail/access
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# by default we allow relaying from localhost...
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
Connect:monit.com RELAY


[[email protected] ~]# cat /etc/mail/local-host-names
monit.com

验证:
# telnet 127.0.0.1 25
查看进程
[[email protected] ~]# ps aux|grep sendmail

修改完成后,重启sendmail服务,通过telnet命令,测试一下看看是否已生效
[[email protected] ~]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to monit.com (127.0.0.1).
Escape character is '^]'.
220 monit.com ESMTP Sendmail 8.13.8/8.13.8; Tue, 12 Jun 2012 18:28:27 +0800
从以上结果可以发现,localhost.localdomain 已经变成了 monit.com这个域名,设置完成!

接下来就可以在zabbix 的管理页面上进行Email 报警设置了。
描述
Email

类型
Email

SMTP server
monit.com

SMTP helo
monit.com

SMTP email

[email protected]

zabbix设置邮件告警(详细图解)
设置完成后点击保存按钮
然后高级配置——用户设置用户的报警介质,添加Email

zabbix设置邮件告警(详细图解)

新建一个action,报警方式选择Email,如图,保存测试即可!
zabbix设置邮件告警(详细图解)