<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt">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 style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> FTL Nagios <ftlnagios@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> 'Zama Ques' <queszama@yahoo.in>; 'Nagios Users List' <nagios-users@lists.sourceforge.net> <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 class="y_msg_container"><br><div id="yiv1157994723"><style><!--
#yiv1157994723
_filtered #yiv1157994723 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
_filtered #yiv1157994723 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
#yiv1157994723
#yiv1157994723 p.yiv1157994723MsoNormal, #yiv1157994723 li.yiv1157994723MsoNormal, #yiv1157994723 div.yiv1157994723MsoNormal
{margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman", "serif";}
#yiv1157994723 a:link, #yiv1157994723 span.yiv1157994723MsoHyperlink
{color:#0563C1;text-decoration:underline;}
#yiv1157994723 a:visited, #yiv1157994723 span.yiv1157994723MsoHyperlinkFollowed
{color:#954F72;text-decoration:underline;}
#yiv1157994723 span.yiv1157994723EmailStyle17
{font-family:"Calibri", "sans-serif";color:windowtext;}
#yiv1157994723 .yiv1157994723MsoChpDefault
{font-size:10.0pt;}
_filtered #yiv1157994723 {margin:72.0pt 72.0pt 72.0pt 72.0pt;}
#yiv1157994723 div.yiv1157994723WordSection1
{}
--></style><div><div class="yiv1157994723WordSection1"><div class="yiv1157994723MsoNormal"><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 class="yiv1157994723MsoNormal"><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 class="yiv1157994723MsoNormal"><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:queszama@yahoo.in] <br><b>Sent:</b> 17 April 2013 08:01<br><b>To:</b> nagios-users@lists.sourceforge.net<br><b>Subject:</b> [Nagios-users] Receiving mail alert for failed
services</span></div></div></div><div class="yiv1157994723MsoNormal"> </div><div><div><div class="yiv1157994723MsoNormal" style="background:white;"><span style="font-family:"Arial", "sans-serif";color:black;">Hi All ,</span></div></div><div><div class="yiv1157994723MsoNormal" style="background:white;"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">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 class="yiv1157994723MsoNormal"><span style="font-family:"Arial",
"sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">=====</span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> /usr/local/nagios/etc/objects/contacts.cfg </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">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" ymailto="mailto:zaman@server.example.com" target="_blank" href="mailto:zaman@server.example.com">zaman@server.example.com</a> ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******<br> }</span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">define contactgroup{<br> contactgroup_name nagiosadmins<br>
alias Nagios Administrators<br> members zamanl<br> }</span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">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 class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">[@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 class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">[@server ~]$ id<br>uid=501(zaman) gid=501(zaman) groups=501(zaman)<br>[@server ~]# mail<br>No mail for zaman<br>[@server ~]# hostname <br>server.example.com</span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">Kindly suggest what needs to be done to receive alert mail for failed services ? </span></div></div><div><div class="yiv1157994723MsoNormal"><span
style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">Any help will be highly appreciated .</span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;"> </span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">Thanks</span></div></div><div><div class="yiv1157994723MsoNormal"><span style="font-family:"Arial", "sans-serif";color:black;">Zaman</span></div></div></div></div></div></div><br><br></div> </div> </div> </div></body></html>