LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-05-2010, 06:16 PM   #1
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Rep: Reputation: 30
Unhappy Nagios has stopped sending email notification s


Nagios has been up and running for quite sometime now and no issues till this month. For some reason, Nagios kept failing to send notifications out to our department. Out of curiosity I've sent the email out manually and tailed the mail.log then found out that every email being sent is getting a "Connection Refused." Can this be a permission issue? If so where and why all of the sudden it just stopped working as none has changed in the OS (Ubuntu Core).
Please advise. Cheers!
 
Old 05-05-2010, 06:23 PM   #2
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 94

Rep: Reputation: 21
Do you relay mail through another host?

Is sendmail (or your mailing application) running?

/etc/init.d/sendmail status
 
Old 05-05-2010, 07:11 PM   #3
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by LVsFINEST View Post
Do you relay mail through another host?

Is sendmail (or your mailing application) running?

/etc/init.d/sendmail status
Hmm it gave me this:
MSP: is run via cron (20m)
MTA: is not running
QUE: Same as MTA

So I restarted it:
* Restarting Mail Transport Agent (MTA) sendmail 554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set
[ OK ]

What do you think got changed? Like stated on my post, none has changed - just basically stopped all of the sudden.
 
Old 05-05-2010, 08:47 PM   #4
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 94

Rep: Reputation: 21
More than likely, nothing changed. Daemons can die for any number of reasons, and that appears to be the case here. You could check /var/log/mail.log for clues, maybe it'll tell you what happened.
 
Old 05-06-2010, 10:00 AM   #5
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by LVsFINEST View Post
More than likely, nothing changed. Daemons can die for any number of reasons, and that appears to be the case here. You could check /var/log/mail.log for clues, maybe it'll tell you what happened.
Yea did that and saw this clue:
May 6 07:43:04 nagiossrv sendmail[20128]: o46Eh4bx020128: to=admin@csaa.com, ctladdr=nagios (1001/1002), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30319, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Not so sure why this is the case "Connection refused.."
I've checked levels on to 235 and restarted still giving me:
service sendmail restart
* Restarting Mail Transport Agent (MTA) sendmail 554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set [ OK ]
 
Old 05-06-2010, 01:15 PM   #6
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by deibertine View Post
Yea did that and saw this clue:
May 6 07:43:04 nagiossrv sendmail[20128]: o46Eh4bx020128: to=admin@csaa.com, ctladdr=nagios (1001/1002), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30319, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Not so sure why this is the case "Connection refused.."
I've checked levels on to 235 and restarted still giving me:
service sendmail restart
* Restarting Mail Transport Agent (MTA) sendmail 554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set [ OK ]
Ok installed exim4 see if that'll resolve it but now gave me this when restarting sendmail:
service sendmail restart
* Restarting Mail Transport Agent (MTA) sendmail start-stop-daemon: stat /usr/sbin/sendmail-mta: No such file or directory (No such file or directory)
/etc/init.d/sendmail: 1287: /usr/sbin/sendmail-msp: not found [ OK ]
 
Old 05-06-2010, 01:49 PM   #7
deibertine
Member
 
Registered: Mar 2009
Posts: 222

Original Poster
Rep: Reputation: 30
I have finally gave up on troubleshooting this further in which I cleaned up and removed all instances for sendmail.
I then reinstalled and re-configured sendmail referencing our old configs.
Now Nagios is sending email notifications.
Still left clueless on why all of the sudden it stopped working mysteriously...
Problem solved!
 
Old 05-06-2010, 08:22 PM   #8
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 94

Rep: Reputation: 21
The 'connection refused' indicates that the port was not open, ie a daemon was not listening on that port. And on your previous post when you pasted the output of sendmail's status, it said "MTA: is not running", which means your Mail Transport Agent (sendmail) was not running. So it appears your root cause was the Sendmail daemon not actually running.

As for restarting sendmail, I'm not sure if yours actually ever (re)started. You do have '[ OK ]' in your output as if it did, but it also threw an error (sendmail 554 5.0.0 No local mailer defined 554 5.0.0 QueueDirectory (Q) option must be set). Did you ever check sendmail's status after attempting to restart it (/etc/init.d/sendmail status)? Did you verify if the process actually spawned (ps -efww or ps -aux)? Was sendmail listening on port 25 (netstat -lntp)?

I know its too late now. But for next time
 
  


Reply

Tags
nagios, notification


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios Email Notification Assistance deibertine Linux - Newbie 7 10-05-2012 12:19 PM
Nagios email notification unable to work with Nail Mail fabbie Linux - Server 3 10-22-2009 11:01 PM
Few questions about Nagios - reboot notification, value=x notification. marccmile Linux - Software 5 06-04-2009 06:44 PM
NAGIOS notification ny101880 Linux - Newbie 14 01-04-2009 01:10 AM
Nagios not sending alerts through email lemay_jeff Linux - Networking 2 04-11-2005 10:28 AM


All times are GMT -5. The time now is 09:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration