e-mail notifications not being sent

Claudio Kuenzler ck at claudiokuenzler.com
Tue Nov 22 10:56:38 CET 2011


Normally the mail binary takes the hostname into account.
Verify the following files if you correctly have set up the hostname:
/etc/hosts
/etc/HOSTNAME

You might also want to take a look at .mailrc if the hostname is still not
shown.

On Mon, Nov 21, 2011 at 10:17 PM, Kaplan, Andrew H.
<AHKAPLAN at partners.org>wrote:

> **
> Hi there --
>
> I checked the nagios.log file, and the problem was due to the mail binary
> not being at the /bin folder. I created a symbolic link
> at that location to point to the /usr/bin/mail binary. Once that was done,
> notifications were sent to the recipient.
>
> As a follow-up, the address of the Nagios server is shown to be
> nagios at localdomain. I would like to change that to reflect the
> name of the server. What file(s) do I need to modify in order to make that
> happen?
>
> Thanks.
>
>  ------------------------------
> *From:* Claudio Kuenzler [mailto:ck at claudiokuenzler.com]
> *Sent:* Monday, November 21, 2011 3:25 PM
> *To:* Nagios Users List
> *Subject:* Re: [Nagios-users] e-mail notifications not being sent
>
> Maybe you have to replace the mail program by something on your system,
> e.g. /usr/bin/mailx.
> That's always one of the first things I change in a new Nagios
> installation.
> What OS are you using? Try to install the required programs
> (mail/mailx...) if they can't be found in your system.
>
> On Mon, Nov 21, 2011 at 8:25 PM, Kaplan, Andrew H. <AHKAPLAN at partners.org>wrote:
>
>> **
>>
>> Hi there --
>>
>> I completed the installation of Nagios 3.3.1, and I am going through the
>> testing process. The server is able to successfully monitor
>>
>> our various clients, but e-mail notifications for critical conditions are
>> not being sent to the intended recipient. The e-mail server that
>>
>> is on the Nagios server is the Postfix message transfer agent.
>>
>> The troubleshooting steps that I have taken so far are the following:
>>
>> 1. I have been able to send a test e-mail from the Nagios server to the
>> intended recipient using two different mail commands. The test
>>
>>     e-mail was done from the command line using the mail and mailx
>> commands using the command syntax:
>>
>> mail <e-mail address> < /etc/fstab
>> mailx -s "test" <e-mail address> < /etc/fstab
>>
>> 2. I checked the contacts.cfg file, and confirmed the intended recipient
>> is listed with the correct address.
>>
>> 3. I checked the nagios.log, and there were entries that were similar to
>> the following:
>>
>> [1321385615] Warning: Attempting to execute the command "/usr/bin/printf
>> "%b" "***** Nagios 2.6 *****\n\nNotification Type: PROBLEM\nHost: ...
>> Date/Time: Tue Nov 15 14:33:35 EST 2011\n" |
>>
>> /bin/mail -…<e-mail address>" resulted in a return code of 127.  Make
>> sure the script or binary you are trying to execute actually exists…
>>
>> I did a search for the mail binary, and there was none at that location.
>> To correct the problem, I created a symbolic that pointed to the actual
>>
>> location of the mail binary which was located at the /usr/bin/ folder.
>>
>> 4. As far as I can tell, all hosts have e-mail notifications enabled on
>> them.
>>
>> What other steps do I need to take in order to get e-mail notifications
>> to work here?
>>
>> Thanks.
>>
>>
>>
>> The information in this e-mail is intended only for the person to whom it
>> is
>> addressed. If you believe this e-mail was sent to you in error and the
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . If the e-mail was sent to you
>> in error
>> but does not contain patient information, please contact the sender and
>> properly
>> dispose of the e-mail.
>>
>>
>> ------------------------------------------------------------------------------
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> Nagios-users mailing list
>> Nagios-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-users
>> ::: Please include Nagios version, plugin version (-v) and OS when
>> reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20111122/1f95d1cf/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list