*or* On Tue, Dec 8, 2009 at 6:26 PM, Marcel <[email protected]> wrote:
> either you don't have printf of mail. > > On Tue, Dec 8, 2009 at 5:41 PM, ReynierPM <[email protected]> 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 **" [email protected]" 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 >> [email protected] >> 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 >> > >
------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev
_______________________________________________ Nagios-users mailing list [email protected] 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
