Zabbix邮件报警设置
[[email protected] alertscripts]# pwd
/usr/local/zabbix/alertscripts
[[email protected] alertscripts]# vim SendEmail.sh
to=$1
subject=$2
body=$3
/usr/local/bin/sendEmail -f [email protected] -t "$to" -s smtp.126.com -u "$subject" -o message-content-type=html -o message-charset=utf8 -xu [email protected] -xp gongjn -m "$body"
~
2、名称可以随便自己定义 ----- 类型选择脚本 ----- 脚本名称输入上一步编写的发送邮件的脚本名称 ----
再添加以下3个参数,分别对应脚本需要的3个参数:收件人地址、主题、详细内容:
{ALERT.SENDTO}
{ALERT.SUBJECT}
{ALERT.MESSAGE}