nagios 邮件通知内容
原创
©著作权归作者所有:来自51CTO博客作者mit-tony的原创作品,谢绝转载,否则将追究法律责任
注意放到 notepad 中打开
http://caspian.dotconf.net/menu/Software/SendEmail/#download
服务通知内容:
/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/local/bin/sendEmail.pl -f m@de.com -t $CONTACTEMAIL$ -s mail.de.com -o tls=no -u "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -xu m@de.com -xp 123456
主机通知内容:
/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:$HOSTOUTPUT$" | /usr/local/bin/sendEmail.pl -f m@de.com -t $CONTACTEMAIL$ -s mail.de.com -o tls=no -u "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$HOSTADDRESS$ is $HOSTSTATE$ **" -xu m@de.com -xp 123456
注意放到 notepad 中打开