2
回答
nagios邮件报警有时候能收到,有时候收不到
科大讯飞通用文字识别100000次/天免费使用。立即申请   

我用mail命令可以收到邮件,我把他写到commands.cfg 里

define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $N
OTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HO
STOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/local/bin/sendEmail -f qinqiang@3gpp.com
.cn -t qinqiang@3gpp.com.cn -s 127.0.0.1 -u "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$S
ERVICEDESC$ is $SERVICESTATE$ **"
}

可是查看邮件日志发现有些收到了有些没有收到

Apr 19 14:34:29 ppcn-10-100 postfix/smtpd[29341]: connect from localhost[127.0.0.1]
Apr 19 14:34:29 ppcn-10-100 postfix/smtpd[29341]: 304CB2D430C: client=localhost[127.0.0.1]
Apr 19 14:34:29 ppcn-10-100 postfix/cleanup[29355]: 304CB2D430C: message-id=<340849.625502841-sendEmail@ppcn-10-100>
Apr 19 14:34:29 ppcn-10-100 postfix/smtpd[29341]: disconnect from localhost[127.0.0.1]
Apr 19 14:34:29 ppcn-10-100 postfix/qmgr[32074]: 304CB2D430C: from=<qinqiang@3gpp.com.cn>, size=1205, nrcpt=1 (queue active)
Apr 19 14:34:29 ppcn-10-100 postfix/smtp[29369]: 304CB2D430C: to=<qinqiang@3gpp.com.cn>, relay=mail.3gpp.com.cn[59.151.37.12]:25, delay=0.35, delays=0.23/0.02/0.04/0.06, dsn=2.0.0, status=sent (250 ok 1334817186 qp 7530)
Apr 19 14:34:29 ppcn-10-100 postfix/qmgr[32074]: 304CB2D430C: removed

Apr 19 14:46:56 ppcn-10-100 postfix/qmgr[32074]: 8F8CA2D4310: from=<nagios@ppcn-10-100.site>, size=732, nrcpt=1 (queue active)
Apr 19 14:46:56 ppcn-10-100 postfix/smtp[29626]: connect to 3gpp.cn[59.151.46.183]:25: Connection refused
Apr 19 14:46:56 ppcn-10-100 postfix/smtp[29626]: 8F8CA2D4310: to=<qinqiang@3gpp.cn>, relay=none, delay=2340, delays=2340/0.04/0/0, dsn=4.4.1, status=deferred (connect to 3gpp.cn[59.151.46.183]:25: Connection refused)
Apr 19 14:52:56 ppcn-10-100 postfix/pickup[32073]: 5109D2D430F: uid=105 from=<nagios>
Apr 19 14:52:56 ppcn-10-100 postfix/cleanup[11775]: 5109D2D430F: message-id=<20120419065256.5109D2D430F@ppcn-10-100.site>
Apr 19 14:52:56 ppcn-10-100 postfix/qmgr[32074]: 5109D2D430F: from=<nagios@ppcn-10-100.site>, size=716, nrcpt=1 (queue active)

在邮件队列里也有很多没有成功的邮件

5109D2D430F 716 Thu Apr 19 14:52:56 nagios@ppcn-10-100.site
(connect to 3gpp.cn[59.151.46.183]:25: Connection refused)
qinqiang@3gpp.cn

4AF8F2D430A 716 Thu Apr 19 13:52:56 nagios@ppcn-10-100.site
(connect to 3gpp.cn[59.151.46.183]:25: Connection refused)
qinqiang@3gpp.cn

8F8CA2D4310 732 Thu Apr 19 14:07:56 nagios@ppcn-10-100.site
(connect to 3gpp.cn[59.151.46.183]:25: Connection refused)
qinqiang@3gpp.cn

请帮忙分析下,谢谢。。。。

举报
抱着裸睡
发帖于6年前 2回/1K+阅

以下是问题补充:

  • @抱着裸睡 :怎么没人帮我分析分析啊,我发现能收到邮件后就会有一个不能收到的邮件,而且邮件地址还不正确3gpp.cn【59.151.46.183】不是个邮件服务器,为什么会连接他那? (6年前)
顶部