Nagios does not send email notifications

Marcel mitsuto at gmail.com
Tue Dec 8 21:26:49 CET 2009


*or*

On Tue, Dec 8, 2009 at 6:26 PM, Marcel <mitsuto at gmail.com> wrote:

> either you don't have printf of mail.
>
> On Tue, Dec 8, 2009 at 5:41 PM, ReynierPM <rperezm at uci.cu> wrote:
>
>> Hi every:
>> I have problems now with email notification unless I didn't receive one.
>>   I check Nagios Event Logs and see this:
>>
>> [12-08-2009 14:53:28] Warning: Attempting to execute the command
>> "/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:
>> PROBLEM\n\nService: Bacula Dir Daemon\nHost: bacula\nAddress:
>> 10.128.50.11\nState: UNKNOWN\n\nDate/Time: Tue Dec 8 14:53:28 CST
>> 2009\n\nAdditional Info:\n\nRemote command execution failed: Permission
>> denied, please try again." | /bin/mail -s "** PROBLEM Service Alert:
>> bacula/Bacula Dir Daemon is UNKNOWN **" rperezm at uci.cu" resulted in a
>> return code of 127. Make sure the script or binary you are trying to
>> execute actually exists...
>>
>> But the mail never arrive to my Inbox. Why? My config is as follow:
>>
>> define command{
>>        command_name    notify-host-by-email
>>        command_line    /usr/bin/printf "%b" "***** Nagios
>> *****\n\nNotification
>> Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
>> $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" |
>> /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is
>> $HOSTSTATE$ **" $CONTACTEMAIL$
>> }
>>
>> # 'notify-service-by-email' command definition
>> define command{
>>        command_name    notify-service-by-email
>>        command_line    /usr/bin/printf "%b" "***** Nagios
>> *****\n\nNotification
>> Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
>> $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
>> $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s
>> "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is
>> $SERVICESTATE$ **" $CONTACTEMAIL$
>> }
>>
>> Cheers and thanks in advance
>> --
>> ReynierPM
>>
>>
>> ------------------------------------------------------------------------------
>> Return on Information:
>> Google Enterprise Search pays you back
>> Get the facts.
>> http://p.sf.net/sfu/google-dev2dev
>> _______________________________________________
>> Nagios-users mailing list
>> Nagios-users at 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091208/962d49e8/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list