Hi all, i've been having major problems getting email notifications to work with nagios 3.0.6 on Mandriva Linux 2009.0. As part of my attempts to isolate the problem, i've modified commands.cfg thus:
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$" | cat > /var/log/nagios/mail-$(date +%k:%M.%N).log } This produces the required .log file with the request contents - but oddly, the name of the file has an '$' symbol appended to it. If '$' is being appended to the end of the command line, that might well explain why email notifications aren't working: the contact email address would be getting '$' appended to it. i've tested the essentials of the notify-service-by-email command_line by su'ing to the nagios user and running: /usr/bin/printf "%b" "Notification test" | /bin/mail -s "Notification test" my.em...@domain . . . . which works fine. Any help or suggestions regarding a fix or workaround for this issue would be greatly appreciated. :-) Thanks in advance, Alexis. ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Nagios-users mailing list Nagios-users@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