zabbix邮件报警以附件发送的解决方法

3年前 (2016-04-27) Jason Liu 杂项, 运维 0评论 已收录 191℃

#!/bin/sh
echo "$3" > /usr/local/zabbix/share/zabbix/alertscripts/1.txt
dos2unix /usr/local/zabbix/share/zabbix/alertscripts/1.txt
mail -s "$2" $1 < /usr/local/zabbix/share/zabbix/alertscripts/1.txt

 

 

#! /bin/bash #echo "$3" | mail -s "$2" $1 echo "$3" | sed s/'\r'//g | mail -s "$2" $1

相关推荐

嗨、骚年、快来消灭0回复。