chenshouqi2003 发表于 2015-02-05 11:47

nagios发监控邮件失败

本帖最后由 chenshouqi2003 于 2015-02-05 16:09 编辑

求助:
nagios由于前阵子飞信升级,短信提醒不能用了。打算用sendmail发邮件提醒。提示:collect: premature EOM: unexpected close错误。
maillog错误信息
Feb5 10:47:14 hostname sendmail: t152l6YV007220: from=nagios, size=451, class=0, nrcpts=1, msgid=<201502050247.t152l6YV007220@loalhost>, relay=nagios@localhost
Feb5 10:47:24 hostname sendmail: t152lEZl007222: from=<nagios@loalhost>, size=451, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost
Feb5 10:57:20 hostname sendmail: t152v7L4008239: from=nagios, size=451, class=0, nrcpts=1, msgid=<201502050257.t152v7L4008239@loalhost>, relay=nagios@localhost
Feb5 10:57:24 hostname sendmail: t152vKqJ008240: collect: premature EOM: unexpected close
Feb5 10:57:24 hostname sendmail: t152vKqJ008240: collect: unexpected close on connection from localhost, sender=<nagios@loalhost>
Feb5 10:57:24 hostname sendmail: t152vKqJ008240: from=<nagios@loalhost>, size=5, class=0, nrcpts=1, proto=ESMTP, daemon=MTA, relay=localhost
Feb5 11:08:13 hostname sendmail: t1537xKJ009349: from=nagios, size=0, class=0, nrcpts=0, relay=nagios@localhost
Feb5 11:18:14 hostname sendmail: t153I43b010348: from=nagios, size=0, class=0, nrcpts=0, relay=nagios@localhost
"/var/log/maillog" 10131L, 1821760C
nagios.log错误信息
: Thu Feb 5 11:27:45 CST 2015\n\nAdditional Info:\n\n拒绝连接\n" | /bin/mail -s "** PROBLEM Service Alert: 14.17.113.164/3306 is CRITICAL **" xxx@xxx.com' timed out after 30 seconds
SERVICE ALERT: X.X.X.X PING;WARNING;SOFT;1;PING WARNING - Packet loss = 28%, RTA = 61.47 ms
SERVICE ALERT: X.X.X.X;PING;WARNING;SOFT;1;PING WARNING - Packet loss = 28%, RTA = 68.94 ms
SERVICE ALERT: X.X.X.X;PING;OK;SOFT;2;PING OK - Packet loss = 0%, RTA = 20.93 ms
SERVICE ALERT: X.X.X.X;PING;OK;SOFT;2;PING OK - Packet loss = 0%, RTA = 25.06 ms
SERVICE ALERT: X.X.X.X;HTTP80;CRITICAL;SOFT;1;CRITICAL - Socket timeout after 10 seconds
SERVICE ALERT: X.X.X.X;HTTP80;OK;SOFT;2;TCP OK - 0.023 second response time on port 80
SERVICE NOTIFICATION: nagiosadmin;X.X.X.X;3306;CRITICAL;notify-service-by-email;拒绝连接
Warning: Contact 'nagiosadmin' service notification command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: 3306\nHost: X.X.X.X\nAddress: X.X.X.X\nState: CRITICAL\n\nDate/Time
: Thu Feb 5 11:37:46 CST 2015\n\nAdditional Info:\n\n拒绝连接\n" | /bin/mail -s "** PROBLEM Service Alert: X.X.X.X/3306 is CRITICAL **" xxx@xxx.com' timed out after 30 seconds                                    

chenshouqi2003 发表于 2015-02-05 16:18

有没人遇到过?帮忙看看呗。在线等

taozhijiangscu 发表于 2015-02-05 17:20

我也是看看吧。哈哈回复 1# chenshouqi2003


   

chenshouqi2003 发表于 2015-02-05 21:24

回复 3# taozhijiangscu
奇怪了。nagios所有的配置文件从其它地方移植过来都还不行。


   

houjun19830610 发表于 2015-02-12 16:23

你好:
1. 你是让自己的sendmail或者postfix发送邮件吧?看看服务起了嘛?service sendmail/postfix status,不行就重启服务。
2. 用mail命令测试下,echo test | mail -s "nagios test" username@email.com,然后查看tail -100 /var/log/maillog上来看看。贴一下日志。
页: [1]
查看完整版本: nagios发监控邮件失败