Page 1 of 1

Service Notifications not firing off

Posted: Tue Oct 30, 2012 10:27 am
by dzagyva
NagiosĀ® Coreā„¢ 3.4.1
CENTOS 6

My notify_host_by_email works when a host goes down or comes back up; however, my notify_service_by_email script never fires off. When I goto the nagios Notifications log it never sends an email on a critical. Any ideas?

Code: Select all

define command {
        command_name                    notify-service-by-email
       command_line                    /usr/bin/printf "%b" "***** Nagios *****\n\nNotificat/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\n$Additional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mailx -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" [email protected]
        register                        1
}


Re: Service Notifications not firing off

Posted: Tue Oct 30, 2012 2:54 pm
by agriffin
The problem is probably actually in your contact or service definitions or the templates they use. Check for the notifications_option directive and make sure that Nagios is configured to send notifications on critical.