I have been fighting with this virtual server for a week to get it to send emails from nagios using sSMTP. I finally today got it to be able to send emails from the telnet, and through the nagios core. but the problem I am having seems to be lying in the command to send emails.
The current config I am using for the email is
Notify-service-by-email
Command is:/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$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
The one for the host is
notify-host-by-email
command is:/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
I am just trying to get this thing to send me emails when one of my websites is down/responding really slow. I have everything else configured roughly how it needs to be. I can go into a service under nagios core and click send custom notification and that goes through just fine. Just not standard emails when the site is giving a warning, such as when it's ping hits over 1000ms.
Any suggestions would be greatly appreciated. Thank you.