[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nagios-users
Subject:    Re: [Nagios-users] e-mail notifications not being sent
From:       Claudio Kuenzler <ck () claudiokuenzler ! com>
Date:       2011-11-22 9:56:38
Message-ID: CAF-yqghPx=GfnKkAAejpJbSjkenaNKddsz=18MO8SL9FyyADaA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@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 tha=
t
> happen?
>
> Thanks.
>
>  ------------------------------
> *From:* Claudio Kuenzler [mailto:ck@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@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 ar=
e
>> 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 -=85<e-mail address>" resulted in a return code of 127.  Make
>> sure the script or binary you are trying to execute actually exists=85
>>
>> 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 i=
t
>> 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@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@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
>

[Attachment #5 (text/html)]

Normally the mail binary takes the hostname into account. <br>Verify the following \
files if you correctly have set up the hostname: \
<br>/etc/hosts<br>/etc/HOSTNAME<br><br>You might also want to take a look at .mailrc \
if the hostname is still not shown.<br> <br><div class="gmail_quote">On Mon, Nov 21, \
2011 at 10:17 PM, Kaplan, Andrew H. <span dir="ltr">&lt;<a \
href="mailto:AHKAPLAN@partners.org">AHKAPLAN@partners.org</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> <u></u>



<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi \
there --</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" \
face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font \
color="#0000ff" face="Arial" size="2">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</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">at that \
location to point to the /usr/bin/mail binary. Once  that was done, notifications \
were sent to the recipient. </font></span></div> <div dir="ltr" \
align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> \
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">As a \
follow-up, the address of the Nagios server is shown to  be <a \
href="mailto:nagios@localdomain" target="_blank">nagios@localdomain</a>. I would like \
to  change that to reflect the</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">name of \
the server. What file(s) do I need to modify in order  to make that \
happen?</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" \
face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font \
color="#0000ff" face="Arial" size="2">Thanks. </font></span></div><br> <div dir="ltr" \
align="left" lang="en-us"> <hr>
<font face="Tahoma" size="2"><b>From:</b> Claudio Kuenzler 
[mailto:<a href="mailto:ck@claudiokuenzler.com" \
target="_blank">ck@claudiokuenzler.com</a>] <br><b>Sent:</b> Monday, November 21, \
2011 3:25  PM<br><b>To:</b> Nagios Users List<br><b>Subject:</b> Re: [Nagios-users] \
e-mail  notifications not being sent<br></font><br></div><div><div></div><div \
class="h5"> <div></div>Maybe you have to replace the mail program by something on \
your  system, e.g. /usr/bin/mailx.<br>That&#39;s always one of the first things I \
change  in a new Nagios installation.<br>What OS are you using? Try to install the 
required programs (mail/mailx...) if they can&#39;t be found in your system.<br><br>
<div class="gmail_quote">On Mon, Nov 21, 2011 at 8:25 PM, Kaplan, Andrew H. <span \
dir="ltr">&lt;<a href="mailto:AHKAPLAN@partners.org" \
target="_blank">AHKAPLAN@partners.org</a>&gt;</span>  wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px \
0.8ex;PADDING-LEFT:1ex" class="gmail_quote"><u></u>  <div>
  <p><font face="Arial" size="2">Hi there --</font> </p>
  <p><font face="Arial" size="2">I completed the installation of Nagios 3.3.1, and I 
  am going through the testing process. The server is able to successfully 
  monitor</font></p>
  <p><font face="Arial" size="2">our various clients, but e-mail notifications for 
  critical conditions are not being sent to the intended recipient. The e-mail 
  server that</font></p>
  <p><font face="Arial" size="2">is on the Nagios server is the Postfix message 
  transfer agent. </font></p>
  <p><font face="Arial" size="2">The troubleshooting steps that I have taken so far 
  are the following:</font> </p>
  <p><font face="Arial" size="2">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 </font></p>
  <p><font face="Arial" size="2">    e-mail was done from the command 
  line using the mail and mailx commands using the command syntax:</font> </p>
  <p><font face="Arial" size="2">mail &lt;e-mail address&gt; &lt; /etc/fstab 
  </font><br><font face="Arial" size="2">mailx -s &quot;test&quot; &lt;e-mail \
address&gt; &lt;   /etc/fstab</font> </p>
  <p><font face="Arial" size="2">2. I checked the contacts.cfg file, and confirmed 
  the intended recipient is listed with the correct address.</font> </p>
  <p><font face="Arial" size="2">3. I checked the nagios.log, and there were entries 
  that were similar to the following:</font> </p>
  <p><font face="Arial" size="2">[1321385615] Warning: Attempting to execute the 
  command &quot;/usr/bin/printf &quot;%b&quot; &quot;***** Nagios 2.6 \
*****\n\nNotification Type:   PROBLEM\nHost: ... Date/Time: Tue Nov 15 14:33:35 EST \
2011\n&quot; | </font></p>  <p><font face="Arial" size="2">/bin/mail -…&lt;e-mail \
address&gt;&quot; resulted in a   return code of 127.  Make sure the script or binary \
you are trying to   execute actually exists…</font></p>
  <p><font face="Arial" size="2">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 </font></p>
  <p><font face="Arial" size="2">location of the mail binary which was located at 
  the /usr/bin/ folder.</font> </p>
  <p><font face="Arial" size="2">4. As far as I can tell, all hosts have e-mail 
  notifications enabled on them.</font> </p>
  <p><font face="Arial" size="2">What other steps do I need to take in order to get 
  e-mail notifications to work here?</font> </p>
  <p><font face="Arial" size="2">Thanks. </font></p><br><font \
face="monospace"><br><br>The information in this e-mail is intended only for the   \
person to whom it is<br>addressed. If you believe this e-mail was sent to you   in \
error and the e-mail<br>contains patient information, please contact the   Partners \
Compliance HelpLine at<br><a href="http://www.partners.org/complianceline" \
target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was   sent \
to you in error<br>but does not contain patient information, please   contact the \
sender and properly<br>dispose of the   \
e-mail.</font></div><br>------------------------------------------------------------------------------<br>All \
  the data continuously generated in your IT infrastructure<br>contains a 
  definitive record of customers, application performance,<br>security threats, 
  fraudulent activity, and more. Splunk takes this<br>data and makes sense of 
  it. IT sense. And common sense.<br><a href="http://p.sf.net/sfu/splunk-novd2d" \
target="_blank">http://p.sf.net/sfu/splunk-novd2d</a><br>_______________________________________________<br>Nagios-users \
  mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net" \
target="_blank">Nagios-users@lists.sourceforge.net</a><br><a \
href="https://lists.sourceforge.net/lists/listinfo/nagios-users" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br> ::: \
  Please include Nagios version, plugin version (-v) and OS when reporting any 
  issue.<br>::: Messages without supporting info will risk being sent to 
  /dev/null<br></blockquote></div><br></div></div></div>
<br>------------------------------------------------------------------------------<br>
 All the data continuously generated in your IT infrastructure<br>
contains a definitive record of customers, application performance,<br>
security threats, fraudulent activity, and more. Splunk takes this<br>
data and makes sense of it. IT sense. And common sense.<br>
<a href="http://p.sf.net/sfu/splunk-novd2d" \
target="_blank">http://p.sf.net/sfu/splunk-novd2d</a><br>_______________________________________________<br>
 Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
 <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br> ::: \
Please include Nagios version, plugin version (-v) and OS when reporting any \
issue.<br> ::: Messages without supporting info will risk being sent to \
/dev/null<br></blockquote></div><br>



------------------------------------------------------------------------------
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@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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic