I have defined a custom service notification command that I am using to send alerts to CA Spectrum. That part is working, but for every alert I send, I am also getting a corresponding service notification by email to the nagiosadmins contact group despite my service having an inherited contacts statement. I have spent hours trying to track this down and just can’t resolve it. Can anyone tell me why the notify-service-by-email command is being called at all? Thanks.
Here is the service.
Here is the service template and contact.
name spectrum-sbgw-service ; Spectrum Southbound Gateway
‘notify-service-by-spectrum’ command definition
command_line /usr/bin/sudo -u spectrum /usr/local/scripts/spectrum-sbgw $HOSTNAME$ $HOSTADDRESS$ $SERVICEDESC$ $SERVICESTATE$ “$SERVICEOUTPUT$”
And here is the action logged.
Mon Apr 20 10:52:31 2009 SERVICE ALERT: bt-lin-datactr3;check-sbgw-test;CRITICAL;HARD;1;CRIT: Test failed with CRIT
Mon Apr 20 10:52:31 2009 SERVICE NOTIFICATION: nagiosadmin;bt-lin-datactr3;check-sbgw-test;CRITICAL;notify-service-by-email;CRIT: Test failed with CRIT
Mon Apr 20 10:52:31 2009 SERVICE NOTIFICATION: spectrum-sbgw;bt-lin-datactr3;check-sbgw-test;CRITICAL;notify-service-by-spectrum;CRIT: Test failed with CRIT