double notifications
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
double notifications
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
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
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: double notifications
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!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
Re: double notifications
Sure,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!
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
}
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
}
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: double notifications
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)
servicegroups some_serviceGroup
contact_groups my-admins (also contacts for this group please)
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
Re: double notifications
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 someemail@domain.com
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
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.
Former Nagios employee
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
Re: double notifications
Yes it is not a standard notification.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.
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
}
The script comes from: http://exchange.nagios.org/directory/Pl ... il/details
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: double notifications
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.
- sebastiaopburnay
- Posts: 105
- Joined: Sun Oct 31, 2010 1:40 pm
- Location: Lisbon, Portugal
Re: double notifications
Those contact definitions are all alike.
The email address changes
The email address changes
Re: double notifications
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.
Former Nagios employee