Hello everyone, I'm fairly new to Nagios and I've managed to configure everything as I want it to be but Nagios isn't creating alert emails or sending me over to my email address.
I'm running it on Suse Linux 10.1. This machine is purely configured for Nagios and by the looks of it Suse Linux is using Postfix instead of Sendmail and when I do
It tells me that postfix is running
I haven't changed anything in commands.cfg file and here's a copy - paste of what its in.
'host-notify-by-email' command definition
command_line /usr/bin/printf "%b" "***** Nagios 2.7 *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
'notify-by-email' command definition
command_line /usr/bin/printf "%b" "***** Nagios 2.7 ***\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s " $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
This is what I've got configured in my minimal.cfg file.
email my email address where I want the nagios alerts to go to
When I send a test email to my workstation from command line using either mail or nail command, I receive the email within seconds. I really don't have a clue where the problem lies so please help.