Page 2 of 7
Re: using contacts causing double email alert
Posted: Fri Aug 29, 2014 10:29 pm
by hata_ph
abrist,
the same event send notification to root and itnetworksupport when i use contacts
but if i use contact_groups, notification will only send to itnetworksupport which is my intention.
Re: using contacts causing double email alert
Posted: Tue Sep 02, 2014 4:57 pm
by abrist
Is this not working as intended? If you specify the contact "root" on the object, and that object alerts, it will send to "root". Am I missing something?
Re: using contacts causing double email alert
Posted: Wed Sep 03, 2014 12:41 am
by hata_ph
abrist wrote:Is this not working as intended? If you specify the contact "root" on the object, and that object alerts, it will send to "root". Am I missing something?
if i use
contacts root, i will get duplicate alert send to root and itnetworksupport while both root and itnetworksupport use different email address.
If i use
contact_groups admins, i will get 1 alert to itnetworksupport which is what i want.
If
contact root will only send 1 alert, i will gladly use it.
I only can make it send 1 alert using
contact_groups admins
For reference, this is my contact config
Code: Select all
###############################################################################
# contacts.cfg
###############################################################################
###############################################################################
###############################################################################
#
# CONTACTS
#
###############################################################################
###############################################################################
# In this simple config file, a single contact will receive all alerts.
define contact{
name contact-template
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
}
define contact{
contact_name root
alias Root
use contact-template
email xxx1
}
define contact{
contact_name itnetworksupport
alias IT Network Support
use contact-template
email xxxx2
}
###############################################################################
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
###############################################################################
# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members itnetworksupport
}
Re: using contacts causing double email alert
Posted: Thu Sep 04, 2014 1:36 pm
by sreinhardt
For a moment you had me thinking that using contact instead of contacts was something you had tried and made to work. The term contacts is used both in singular contact and contacts when applied to an object. At this point, I think we really need to see the entirity of your configs. If they do not have sensitive information aside from email, feel free to tar and upload them. If you are worried, which is perfectly reasonable, please pm them to myself or another support member.
Re: using contacts causing double email alert
Posted: Fri Sep 05, 2014 7:21 am
by hata_ph
thanks all for your help...i already attached my full config on post 7...pls let me know if you all have any question...
Re: using contacts causing double email alert
Posted: Fri Sep 05, 2014 12:11 pm
by sreinhardt
Cool, I must have missed it before. I'll take a look and see if anything sticks out.
Re: using contacts causing double email alert
Posted: Sat Sep 06, 2014 1:33 am
by millisa
The missing 'register 0' in the contact-template jumps out at me:
Code: Select all
define contact{
name contact-template
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
}
Change to:
Code: Select all
define contact{
name contact-template
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
register 0
}
Re: using contacts causing double email alert
Posted: Mon Sep 08, 2014 2:35 am
by hata_ph
hi milisa,
try using
register 0 on my contacts template but not work...

any more idea?
Re: using contacts causing double email alert
Posted: Mon Sep 08, 2014 9:25 am
by millisa
For a template, you want to use register 0 like posted above.
Re: using contacts causing double email alert
Posted: Mon Sep 08, 2014 11:49 am
by hata_ph
millisa wrote:For a template, you want to use register 0 like posted above.
sorry... i mean using register 0 not work