Service Notifications not firing off

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dzagyva
Posts: 5
Joined: Mon Oct 29, 2012 12:06 pm

Service Notifications not firing off

Post 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
}

agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Service Notifications not firing off

Post 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.
Locked