<div> </div>
<div>Hey sounds good but what exctly am i exucuting at the commadn line </div>
<div> </div>
<div>is this the line i am executing: i replaced $CONTACTEMAIL$ with my email address but says cant find directory i tried executing from root:</div>
<div>su nagios s /bin/sh but says cant find directory ?? help please </div>
<div> </div>
<div><strong>/bin/mail -s  "Host $HOSTSTATE$ alert for $HOSTNAME$!" $nedo72@gmail.com$</strong><br> </div>
<div><br><br> </div>
<div><span class="gmail_quote">On 10/3/07, <b class="gmail_sendername">Hugo van der Kooij</b> <<a href="mailto:hvdkooij@vanderkooij.org">hvdkooij@vanderkooij.org</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Wed, 3 Oct 2007, Nedim Bicic wrote:<br><br>> Hey all have nagios 2.9 running linux red hat enterprise 4 the email for
<br>> nagios sending notifications arent working for some reason i know the box<br>> can send email because the it has the MTA agent installed cuase i can send<br>> other emials from that machine<br>><br>> I can see host down in nagios webpage i have the contact groups set
<br>> appropritaley and of course my email address in contacts group i even did a<br>> sanity check to see if i have any syntex errors nothing so far.<br>><br>> this is what i have in commands.cfg file under emails:
<br>><br>> # 'host-notify-by-email' command definition<br>> define command{<br>> command_name host-notify-by-email<br>> command_line /usr/bin/printf "%b" "***** Nagios 2.9 *****\n\nNotification
<br>> Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:<br>> $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" |<br>> /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
<br>> }<br>><br>> and i also took out the option not to notify in my host file.<br><br>Do you have events logged by Nagios? Does it show notifications? If that<br>happens to be the case then llok at the delivery of the notifications.
<br><br>If one assumes you run this as the nagios user then test is as such.<br><br>Become the nagios user with:<br>       su - nagios s /bin/sh<br><br>Then execute the command as shown on the commandline but substitute<br>
$CONTACTEMAIL for the intended recipient.<br><br>If that fails to deliver then you need to fix your MTA. Get to the logs of<br>it to check it out.<br><br>Hugo.<br><br>--<br>       <a href="mailto:hvdkooij@vanderkooij.org">
hvdkooij@vanderkooij.org</a>        <a href="http://hugo.vanderkooij.org/">http://hugo.vanderkooij.org/</a><br>           This message is using 100% recycled electrons.<br><br>       Some men see computers as they are and say "Windows"
<br>       I use computers with Linux and say "Why Windows?"<br>       (Thanks JFK, for this quote of George Bernard Shaw.)<br><br>-------------------------------------------------------------------------<br>This 
SF.net email is sponsored by: Splunk Inc.<br>Still grepping through log files to find problems?  Stop.<br>Now Search log events and configuration files using AJAX and a browser.<br>Download your FREE copy of Splunk now >> 
<a href="http://get.splunk.com/">http://get.splunk.com/</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">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>