email notification suddenly stopped working

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
chewy747
Posts: 9
Joined: Thu Aug 02, 2012 11:51 am

email notification suddenly stopped working

Post by chewy747 »

I setup nagios about 8 months ago or so. I never did anything special to get email notification to work but it always did right out of the gate, then all of a sudden it stopped working. Im having trouble finding any definitive guides to getting it working or troubleshooting. Im having trouble even sending a test mail out from the nagios box.
This is an opensuse linux box if it makes any difference. Thanks for any help!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: email notification suddenly stopped working

Post by slansing »

Which MTA are you using to send the emails out as notifications occur, has your domain changed at all?
chewy747
Posts: 9
Joined: Thu Aug 02, 2012 11:51 am

Re: email notification suddenly stopped working

Post by chewy747 »

im not sure since when I originally set up nagios the email notifications just worked automatically.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: email notification suddenly stopped working

Post by lmiltchev »

You should probably first check if notifications are enabled globally in the nagios.cfg file. You should have:

Code: Select all

enable_notifications=1
You can also try sending a test e-mail from terminal:

Code: Select all

echo test | mail <your_email>
Be sure to check out our Knowledgebase for helpful articles and solutions!
chewy747
Posts: 9
Joined: Thu Aug 02, 2012 11:51 am

Re: email notification suddenly stopped working

Post by chewy747 »

notifications are enabled

here is the results that get sent back

This is the mail system at host nagios.domain.lan.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<[email protected]>: unable to look up host domain.org: Name or service not
known

--0B0AB6C830.1343951551/nagios.domain.lan
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; nagios.domain.lan
X-Postfix-Queue-ID: 0B0AB6C830
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Thu, 2 Aug 2012 19:52:31 -0400 (EDT)

Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.4.4
Diagnostic-Code: X-Postfix; unable to look up host domain.org: Name or
service not known

--0B0AB6C830.1343951551/nagios.domain.lan
Content-Description: Undelivered Message
Content-Type: message/rfc822

Return-Path: <[email protected]>
Received: by nagios.domain.lan (Postfix, from userid 0)
id 0B0AB6C830; Thu, 2 Aug 2012 19:52:31 -0400 (EDT)
Date: Thu, 02 Aug 2012 19:52:31 -0400
To: [email protected]
User-Agent: Heirloom mailx 12.2 01/07/07
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <[email protected]>
From: [email protected] (root)

test

--0B0AB6C830.1343951551/nagios.domain.lan--



lmiltchev wrote:You should probably first check if notifications are enabled globally in the nagios.cfg file. You should have:

Code: Select all

enable_notifications=1
You can also try sending a test e-mail from terminal:

Code: Select all

echo test | mail <your_email>
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: email notification suddenly stopped working

Post by nscott »

It looks like Postfix isn't set up. Do you remember doing any setup for Postfix at all? Or is [email protected] actually a valid email address in your system?
Nicholas Scott
Former Nagios employee
chewy747
Posts: 9
Joined: Thu Aug 02, 2012 11:51 am

Re: email notification suddenly stopped working

Post by chewy747 »

nscott wrote:It looks like Postfix isn't set up. Do you remember doing any setup for Postfix at all? Or is [email protected] actually a valid email address in your system?
I never did anything to setup postfix. I just replaced our actual domain name with "domain" when posting. [email protected] is valid
chewy747
Posts: 9
Joined: Thu Aug 02, 2012 11:51 am

Re: email notification suddenly stopped working

Post by chewy747 »

Anyone have a guide to setup postfix?
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: email notification suddenly stopped working

Post by agriffin »

Postfix is a rather complicated piece of software. If you're still having problems with it, I suggest you consult its documentation and community rather than relying on the Nagios community. Unfortunately, we can't be experts on every piece of software that Nagios comes into contact with.
Locked