*or*<br><br><div class="gmail_quote">On Tue, Dec 8, 2009 at 6:26 PM, Marcel <span dir="ltr"><<a href="mailto:mitsuto@gmail.com">mitsuto@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
either you don't have printf of mail. <br><div><div></div><div class="h5"><br><div class="gmail_quote">On Tue, Dec 8, 2009 at 5:41 PM, ReynierPM <span dir="ltr"><<a href="mailto:rperezm@uci.cu" target="_blank">rperezm@uci.cu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi every:<br>
I have problems now with email notification unless I didn't receive one.<br>
   I check Nagios Event Logs and see this:<br>
<br>
[12-08-2009 14:53:28] Warning: Attempting to execute the command<br>
"/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:<br>
PROBLEM\n\nService: Bacula Dir Daemon\nHost: bacula\nAddress:<br>
10.128.50.11\nState: UNKNOWN\n\nDate/Time: Tue Dec 8 14:53:28 CST<br>
2009\n\nAdditional Info:\n\nRemote command execution failed: Permission<br>
denied, please try again." | /bin/mail -s "** PROBLEM Service Alert:<br>
bacula/Bacula Dir Daemon is UNKNOWN **" <a href="mailto:rperezm@uci.cu" target="_blank">rperezm@uci.cu</a>" resulted in a<br>
return code of 127. Make sure the script or binary you are trying to<br>
execute actually exists...<br>
<br>
But the mail never arrive to my Inbox. Why? My config is as follow:<br>
<br>
define command{<br>
        command_name    notify-host-by-email<br>
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification<br>
Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:<br>
$HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" |<br>
/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is<br>
$HOSTSTATE$ **" $CONTACTEMAIL$<br>
}<br>
<br>
# 'notify-service-by-email' command definition<br>
define command{<br>
        command_name    notify-service-by-email<br>
        command_line    /usr/bin/printf "%b" "***** Nagios *****\n\nNotification<br>
Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:<br>
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:<br>
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s<br>
"** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is<br>
$SERVICESTATE$ **" $CONTACTEMAIL$<br>
}<br>
<br>
Cheers and thanks in advance<br>
--<br>
ReynierPM<br>
<br>
------------------------------------------------------------------------------<br>
Return on Information:<br>
Google Enterprise Search pays you back<br>
Get the facts.<br>
<a href="http://p.sf.net/sfu/google-dev2dev" target="_blank">http://p.sf.net/sfu/google-dev2dev</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></blockquote></div><br>