10 月 242014
 

发送失败的日志消息

Oct 24 18:37:27 monitor nagios: SERVICE ALERT: USA;PING;CRITICAL;HARD;3;PING CRITICAL - Packet loss = 0%, RTA = 176.76 ms
Oct 24 18:37:27 monitor nagios: SERVICE NOTIFICATION: nagiosadmin;USA;PING;CRITICAL;notify-service-by-email;PING CRITICAL - Packet loss = 0%, RTA = 176.76 ms
Oct 24 18:37:27 monitor nagios: Warning: Attempting to execute the command "/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: PING\nHost: USA\nAddress: 50.7.103.90\nState: CRITICAL\n\nDate/Time: Fri Oct 24 18:37:27 CST 2014\n\nAdditional Info:\n\nPING CRITICAL - Packet loss = 0%, RTA = 176.76 ms\n" | /bin/mail -s "** PROBLEM Service Alert: USA/PING is CRITICAL **" nagios@localhost,harvey.mei@sample.cn,harvey.mei@msn.com,1882528****@139.com" resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists...

查看是否安装邮件程序

[root@monitor objects]# ls /bin/mail
ls: cannot access /bin/mail: No such file or directory
[root@monitor objects]# yum install mailx

再次查看成功发送的日志

Oct 24 18:47:29 monitor postfix/pickup[11720]: 13D3C6406B6: uid=503 from=<nagios>
Oct 24 18:47:29 monitor postfix/cleanup[12911]: 13D3C6406B6: message-id=<20141024104729.13D3C6406B6@monitor.localdomain>
Oct 24 18:47:29 monitor postfix/qmgr[11721]: 13D3C6406B6: from=<nagios@monitor.localdomain>, size=777, nrcpt=4 (queue active)
Oct 24 18:47:29 monitor postfix/local[12919]: 13D3C6406B6: to=<nagios@localhost.localdomain>, orig_to=<nagios@localhost>, relay=local, delay=0.04, delays=0.02/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 24 18:47:29 monitor postfix/smtp[12921]: connect to mxbiz1.qq.com[240e:ff:f040:28::c]:25: Network is unreachable
Oct 24 18:47:29 monitor postfix/smtp[12921]: 13D3C6406B6: to=<harvey.mei@sample.cn>, relay=mxbiz1.qq.com[113.108.16.61]:25, delay=0.54, delays=0.02/0.03/0.1/0.39, dsn=5.0.0, status=bounced (host mxbiz1.qq.com[113.108.16.61] said: 550 Mail content denied. http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000726 (in reply to end of DATA command))
Oct 24 18:47:35 monitor postfix/smtp[12920]: 13D3C6406B6: to=<1882528****@139.com>, relay=mx1.mail.139.com[221.176.66.188]:25, delay=6.2, delays=0.02/0.03/6.1/0.11, dsn=2.0.0, status=sent (250 ok)
Oct 24 18:52:29 monitor postfix/smtp[12922]: 13D3C6406B6: conversation with mx2.hotmail.com[65.55.33.119] timed out while performing the EHLO handshake

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据