Make sure you have sendmail or postfix configured to do so ;)<div><br><div class="gmail_quote">On Wed, Apr 17, 2013 at 3:00 PM, Zama Ques <span dir="ltr"><<a href="mailto:queszama@yahoo.in" target="_blank">queszama@yahoo.in</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:arial,helvetica,sans-serif">ok...We need to configure a mail agent also . Let me do that and will get back here if it does not work/further doubts. <br>
<div><span>Thanks for the help .<br></span></div><div><br></div><div>Thanks</div><div>Zaman<br></div><div class="hm HOEnZb"> </div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt"><div class="hm HOEnZb">
</div><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div class="hm HOEnZb"> <div dir="ltr"> <hr size="1"> <font face="Arial"> <b><span style="font-weight:bold">From:</span></b> FTL Nagios <<a href="mailto:ftlnagios@gmail.com" target="_blank">ftlnagios@gmail.com</a>><br>
<b><span style="font-weight:bold">To:</span></b> 'Zama Ques' <<a href="mailto:queszama@yahoo.in" target="_blank">queszama@yahoo.in</a>>; 'Nagios Users List' <<a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a>> <br>
<b><span style="font-weight:bold">Sent:</span></b> Wednesday, 17 April 2013 2:51 PM<br> <b><span style="font-weight:bold">Subject:</span></b>
RE: [Nagios-users] Receiving mail alert for failed services<br> </font> </div></div><div><div class="h5"> <div><br><div><div><div><div><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Have you set us Postfix or other such mail agent to actually send the mail?</span></div>
<div><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> </span></div><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"" lang="EN-US">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"" lang="EN-US"> Zama Ques [mailto:<a href="mailto:queszama@yahoo.in" target="_blank">queszama@yahoo.in</a>] <br>
<b>Sent:</b> 17 April 2013 08:01<br><b>To:</b> <a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a><br><b>Subject:</b> [Nagios-users] Receiving mail alert for failed
services</span></div></div></div><div> </div><div><div><div style="background:white"><span style="font-family:"Arial","sans-serif"">Hi All ,</span></div></div><div><div style="background:white"><span style="font-family:"Arial","sans-serif""> </span></div>
</div><div><div><span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif"">I was trying to configure to send alert mails for failed services in Nagios . For this , I tried the following configuration</span></div>
</div><div><div><span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif"">=====</span></div></div><div><div><span style="font-family:"Arial","sans-serif""> /usr/local/nagios/etc/objects/contacts.cfg </span></div>
</div><div><div><span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif"">define contact{<br> contact_name zamanl
; Short name of user<br> use generic-contact ; Inherit default values from generic-contact template (defined above)<br> alias Nagios Admin ; Full name of user<br>
<br> email
<a rel="nofollow" href="mailto:zaman@server.example.com" target="_blank">zaman@server.example.com</a> ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******<br> }</span></div></div><div><div><span style="font-family:"Arial","sans-serif""> </span></div>
</div><div><div><span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif"">define contactgroup{<br> contactgroup_name nagiosadmins<br>
alias Nagios Administrators<br> members zamanl<br> }</span></div></div><div><div><span style="font-family:"Arial","sans-serif""> </span></div>
</div><div><div><span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif"">Restarted nagios service without any errors and it looks like notifications are generated for
failed services by looking at system log file</span></div></div><div><div><span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif""> </span></div>
</div><div><div><span style="font-family:"Arial","sans-serif"">[@server ~]# tail -f /var/log/messages<br>Apr 17 11:26:52 server nagios: SERVICE NOTIFICATION: zamanl;mgthost;Total Processes;CRITICAL;notify-service-by-email;PROCS CRITICAL: 312 processes<br>
Apr 17 11:27:22 server nagios: SERVICE NOTIFICATION: zamanl;host1;Total Processes;CRITICAL;notify-service-by-email;PROCS CRITICAL: 313 processes<br>Apr 17 11:27:22 server nagios: SERVICE NOTIFICATION: zamanl;host2;Total Processes;CRITICAL;notify-service-by-email;PROCS CRITICAL: 313
processes<br><br>But I have not received any mail messages for the notification .</span></div></div><div><div><span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif"">[@server ~]$ id<br>
uid=501(zaman) gid=501(zaman) groups=501(zaman)<br>[@server ~]# mail<br>No mail for zaman<br>[@server ~]# hostname <br><a href="http://server.example.com" target="_blank">server.example.com</a></span></div></div><div><div>
<span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif"">Kindly suggest what needs to be done to receive alert mail for failed services ? </span></div>
</div><div><div><span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif"">Any help will be highly appreciated .</span></div>
</div><div><div><span style="font-family:"Arial","sans-serif""> </span></div></div><div><div><span style="font-family:"Arial","sans-serif"">Thanks</span></div></div><div><div><span style="font-family:"Arial","sans-serif"">Zaman</span></div>
</div></div></div></div></div><br><br></div> </div></div></div> </div> </div></div><br>------------------------------------------------------------------------------<br>
Precog is a next-generation analytics platform capable of advanced<br>
analytics on semi-structured data. The platform includes APIs for building<br>
apps and a phenomenal toolset for data science. Developers can use<br>
our toolset for easy data analysis & visualization. Get a free account!<br>
<a href="http://www2.precog.com/precogplatform/slashdotnewsletter" target="_blank">http://www2.precog.com/precogplatform/slashdotnewsletter</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><br clear="all"><div><br></div>-- <br>Regards<br>Sunil Sankar
</div>