Page 1 of 2
double notifications
Posted: Thu Jul 10, 2014 8:00 am
by sebastiaopburnay
Hi!
I have a distributed Nagios infrastructure pictured in the attached picture.
My Central Nagios' Server (v 3.3.1) is sending double notifications for some events.
I've taken a deep look into the cfg files and found a 'notification_interval' of 0 (zero - If you set this value to 0, Nagios will not re-notify contacts about problems for this service - only one problem notification will be sent out..)
I also verified that there were no duplicate contacts on the contactgroup associated with these service checks.
Does this issue ring a bell?
Thank you in advance for your time and knowlege.
Best regards,
sebastiaopburnay
Re: double notifications
Posted: Thu Jul 10, 2014 4:51 pm
by sreinhardt
Can you show us some config examples of a service that is being forwarded and duplicating notifications? At this point I would say that there are no known bugs that should cause this, and it likely is something with the configs, but let's verify just to be sure!
Re: double notifications
Posted: Fri Jul 11, 2014 3:54 am
by sebastiaopburnay
sreinhardt wrote:Can you show us some config examples of a service that is being forwarded and duplicating notifications? At this point I would say that there are no known bugs that should cause this, and it likely is something with the configs, but let's verify just to be sure!
Sure,
So this is my passive service template:
Code: Select all
define service{
name my-passive-service
active_checks_enabled 0
passive_checks_enabled 1
flap_detection_enabled 1
register 0
is_volatile 0
check_period 24x7
max_check_attempts 1
check_freshness 0
check_command check_dummy!0
notification_interval 0
notification_period 24x7
notification_options w,u,c,r
}
And my service definition:
Code: Select all
# Uptime
define service{
use my-passive-service
host_name some_Router
service_description DNV-Uptime
servicegroups some_serviceGroup
contact_groups my-admins
#check_command custom_uptime!some_SNMP_communïtÿ!2 1
}
It seems right to me
Re: double notifications
Posted: Fri Jul 11, 2014 1:55 pm
by sreinhardt
So are I would agree, it looks prefectly fine. Could you show the following configs that would apply to this as well:
servicegroups some_serviceGroup
contact_groups my-admins (also contacts for this group please)
Re: double notifications
Posted: Mon Jul 14, 2014 4:36 am
by sebastiaopburnay
sreinhardt wrote:So are I would agree, it looks prefectly fine. Could you show the following configs that would apply to this as well:
servicegroups some_serviceGroup
Code: Select all
define servicegroup{
servicegroup_name some_serviceGroup
alias my-servicegroup
notes Some textual note
}
sreinhardt wrote:contact_groups my-admins (also contacts for this group please)
Code: Select all
define contactgroup{
contactgroup_name my-admins
alias my Admins
members my-contact1, my-contact2, my-contact3
}
define contact{
contact_name my-contact1
use my-generic-contact
alias somealias
email [email protected]
host_notification_commands notify-host-by-email-command
service_notification_commands notify-service-by-email-command
}
define contact{
name my-generic-contact
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email-command
host_notification_commands notify-host-by-email-command
register 0
}
Re: double notifications
Posted: Mon Jul 14, 2014 11:55 am
by tmcdonald
Where are notify-service-by-email-command and notify-host-by-email-command defined? Those are not the standard command names. Please post the command definitions.
Re: double notifications
Posted: Tue Jul 15, 2014 3:59 am
by sebastiaopburnay
tmcdonald wrote:Where are notify-service-by-email-command and notify-host-by-email-command defined? Those are not the standard command names. Please post the command definitions.
Yes it is not a standard notification.
It has been created from a php send-mail script:
Code: Select all
define command{
command_name notify-host-by-email-command
command_line $USER1$/nagios_host_mail "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTALIAS$" "$HOSTSTATE$" "$HOSTADDRESS$" "$HOSTOUTPUT$" "$LONGDATETIME$" "$SERVICEDESC$" "$SERVICESTATE$" "$CONTACTEMAIL$" "$TOTALHOSTSUP$" "$TOTALHOSTSDOWN$" "0"
#command_line $USER1$/blank.sh
}
define command{
command_name notify-service-by-email-command
command_line $USER1$/nagios_service_mail "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTALIAS$" "$HOSTSTATE$" "$HOSTADDRESS$" "$SERVICEOUTPUT$" "$LONGDATETIME$" "$SERVICEDESC$" "$SERVICESTATE$" "$CONTACTEMAIL$" "$SERVICEDURATIONSEC$" "$SERVICEDOWNTIME$" "$TOTALSERVICESWARNING$" "$TOTALSERVICESCRITICAL$" "$TOTALSERVICESUNKNOWN$" "0"
#command_line $USER1$/blank.sh
}
As you can see, I have a commented line calling a blank shel script (blank.sh), in case I want to disable all notifications.
The script comes from:
http://exchange.nagios.org/directory/Pl ... il/details
Re: double notifications
Posted: Wed Jul 16, 2014 12:14 pm
by slansing
Can you share the config files for 'my-contact2, my-contact3' as well? I'm wondering if one of them might have two handlers defined together. Also, are you absolutely sure that the duplicate notifications are not due to your main checking server being misconfigured and actually sending some notifications when it should not normally? Are there any differences in the duplicate notifications you get? Could you post them side by side here for reference? Remove all sensitive information if you do.
Re: double notifications
Posted: Mon Jul 21, 2014 8:18 am
by sebastiaopburnay
Those contact definitions are all alike.
The email address changes
Re: double notifications
Posted: Mon Jul 21, 2014 5:04 pm
by tmcdonald
Could you please answer the rest of slansing's questions?
slansing wrote:Also, are you absolutely sure that the duplicate notifications are not due to your main checking server being misconfigured and actually sending some notifications when it should not normally? Are there any differences in the duplicate notifications you get? Could you post them side by side here for reference? Remove all sensitive information if you do.