Mail Stopped working...
Posted: Thu Apr 18, 2013 2:30 am
Can anyone help me out...
I will start from the top....my (commands.cfg)
my(conatcts.cfg)
my(contactgroups.cfg)
Still is my mail que empty...
Is there something im missin'?
I will start from the top....my (commands.cfg)
Code: Select all
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$
register 1
}
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$
register 1
}
Code: Select all
define contact {
contact_name helpdesk
alias Helpdesk
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r,f,s
service_notification_options w,u,c,r,f,s
host_notification_commands notify-host-by-email
service_notification_commands notify-service-by-email
email [email protected]
use generic-contact
register 1
}
Code: Select all
define contactgroup {
contactgroup_name admins
alias Nagios Administrators
members helpdesk
register 1
}
Code: Select all
# sendmail -bp
/var/spool/mqueue is empty
Total requests: 0