Untraceable service by-email notification
Kyle Tucker
kylet at panix.com
Mon Apr 20 17:27:50 CEST 2009
Hi all,
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. I am sure it's being inherited from somewhere,
but I can't see it. Can anyone tell me why the notify-service-by-email
command is being called? Thanks.
- Kyle
Here is the service.
define service{
use spectrum-sbgw-service
host_name bt-lin-datactr3
max_check_attempts 1
service_description check-sbgw-test
check_command check_sbgw
}
Here is the service template and contact.
define service{
name spectrum-sbgw-service ; Spectrum Southbound Gateway
contacts spectrum-sbgw
check_period 24x7
max_check_attempts 3
normal_check_interval 10
retry_check_interval 1
register 1
}
define contact{
contact_name spectrum-sbgw
service_notification_commands notify-service-by-spectrum
service_notification_options w,u,c,r,f,s
service_notification_period 24x7
host_notification_commands notify-host-by-email
host_notification_options d,u,r,f,s
host_notification_period 24x7
register 1
}
The command.
# 'notify-service-by-spectrum' command definition
define command{
command_name notify-service-by-spectrum
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
--
- Kyle
---------------------------------------------
kylet at panix.com http://www.panix.com/~kylet
---------------------------------------------
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list