Notification bug

Kenneth.ray kenneth.ray at travelersla.com
Tue Sep 10 20:13:52 CEST 2002


oh ok, see now that makes sense to me, Yeah if they have the same address
that is ok but  i have a solution for you, instead of playing with the
default groups, you can create
another contact set it to the email address, call it something like
shared-email-micro or something to define it better. then change the 4
users  contacts notification times to be
null. this will give you the functionality you need.  that way they have the
ability to be different but the same in that respect.
so here is an example

define contact{
          use                             microgroup-default
          contact_name                    sam
             service_notification_options    n
          host_notification_options       n
 }
what the above does is now sam gets no notifications but is still using the
microdefault group.
so now you can make a contact that will cover all your people at that one
addy
like so
define contact{
          use                             microgroup-default
          contact_name                    shared-address

}

one thing to remember is that local variables overide ones in the template
hope this helps your problem..



Terry Simons wrote:

  On Tuesday, September 10, 2002, at 07:00 AM, Kenneth.ray wrote:

  > I have noticed that if you put them in different groups it does not
  > stop either
  > Nagios nor Netsaint from re-notifying that same contact. That is a
  > good thing for
  > me, because I have notification groups set up so a person might exist
  > in several
  > groups and receive different notifications for different reasons.
  >
  > Is this a bug? I can't say it is or isn't, but I would say, if its a
  > bug, then
  > KEEP IT. I need it.
  > your information doesnt look like it includes the whole picture, you
  > are only
  > showing one definition of the users, I suspect one of two things,
  > either these users
  > are defined somewhere else OR you have the Contact group  microgroup
  > defined
  > somewhere else as a member of another group, possibly two. This is ok
  > but would
  > produce the effect your describing.

  No, this is the whole picture.  The problem comes into play because
  bob, joe, and sam are using the microgroup-default template and are
  subsequently getting the same E-mail address.

  Since the microgroup-default template contact, bob, joe, and sam are
  all part of the microgroup, and microgroup is getting sent the
  notifications it's sending an email to the micro-default contact's
  e-mail, bob's e-mail, sam's e-mail, and joe's e-mail... which all
  happen to be the same address.

  This is a problem for me because let's say hosta goes down.

  That means I get 4 notifications to the mailing list that hosta is
  down... I'd like to only have 1.

  I think it makes sense that if you have 1 host go down, and you have 4
  people with the same address, it should only send out one notification
  for that one host...

  If you had 2 hosts go down, it should send out 2 notifications... 1 for
  each host... but I'm getting 4 notifications for each host/service.

  I guess I'll have to redesign my templates and whatnot, but it seems
  like this isn't something that would be very useful...

  I can see how having someone in two groups would produce this behavior,
  but I don't have anyone of these users in any other groups.  They are
  only in the microgroup.

  > You might want to check that first, If that is
  > not the case then i would suggest reposting and actually include a
  > service that is
  > displaying the effect as well as your entire contacts and contact
  > groups. without
  > this information, IMHO it would be hard to help you further.

  I've verified that these contacts exist in no other groups via the
  "View Config" option on the website.  They only exist in microgroup.

  It affects any service or host that goes down that microgroup should be
  contacted for.

  What is happening is that instead of getting 1 notification to the
  list, I'm getting 1 notification per person (since they all inherit the
  e-mail address from the template I use) and therefore each person that
  inherits that template is another duplicate message that gets sent to
  the list.  I could quite easily expand my templates out and show you
  what I'm talking about, but someone else said that this is not a bug...
  so I'll go with that and figure out another way to accomplish this...

  - Terry

  >
  >
  >
  >
  >
  > Message: 4
  > Date: Mon, 9 Sep 2002 15:58:46 -0600
  > From: Terry Simons <galimore at mac.com>
  > To: nagios-users at lists.sourceforge.net
  > Subject: [Nagios-users] Notification Bug
  >
  > Hi,
  >
  > A while ago I posted that it seemed like I was getting duplicate
  > messages about outages with Nagios, and that I'd post more when I could
  > determine whether or not it was true...   Today I noticed that it is
  > indeed a problem.
  >
  > Here's the problem:
  >
  > Bob, Joe, and Sam are all including a "default" template for their
  > contact information.
  >
  > Bob, Joe, Sam, and the default template are members of the contact
  > group.  (I did this because I wanted bob, joe, and sam to have separate
  > logins for the web interface, but their notifications need to go to the
  > same mailing list... the config below explains better than I can.)
  >
  > What I'm noticing is that for each notification that gets sent out, I
  > get 4 copies of said notification.
  >
  > This seems like it shouldn't happen based on the filtering rules for
  > notifications... My understanding is that Nagios should only send one
  > notification out for each E-mail address/pager/whatever if duplicates
  > exist.
  >
  > Here are the relevant configs: (names and E-mail addresses have been
  > changed)
  >
  > The 4 contacts which have the same E-mail are microgroup-email, bob,
  > joe, and sam.
  >
  > bob, joe, and sam get that information from microgroup-email, as
  > microgroup-email is the template... but it appears that for all 4 of
  > these contacts a separate E-mail is getting sent out.
  >
  > define contactgroup{
  >          contactgroup_name       microgroup
  >          alias                   Micro Group
  >          members                 microgroup-pager, microgroup-email,
  > bob, joe, sam
  > }
  >
  > define contact{
  >          contact_name                    microgroup-pager
  >          alias                           Microgroup via Pager
  >          service_notification_period     microgroup-pager
  >          host_notification_period        microgroup-pager
  >          service_notification_options    u,c,r
  >          host_notification_options       d,u,r
  >          service_notification_commands   svc-notify-by-pager
  >          host_notification_commands      host-notify-by-pager
  >          pager                           microgroup
  > }
  >
  > define contact{
  >          name                            microgroup-default
  >          contact_name                    microgroup-email
  >          alias                           Microgroup via E-mail
  >          service_notification_period     24x7
  >          host_notification_period        24x7
  >          service_notification_options    u,c,r
  >          host_notification_options       d,u,r
  >          service_notification_commands   svc-notify-by-email
  >          host_notification_commands      host-notify-by-email
  >          email                           list1 at foo.com, list2 at foo.com
  > }
  >
  > define contact{
  >          use                             microgroup-default
  >          contact_name                    sam
  > }
  >
  > define contact{
  >          use                             microgroup-default
  >          contact_name                    joe
  > }
  >
  > define contact{
  >          use                             microgroup-default
  >          contact_name                    bob
  > }
  >
  >
  >
  >
  >
  >
  > -------------------------------------------------------
  > This sf.net email is sponsored by: OSDN - Tired of that same old
  > cell phone?  Get a new here for FREE!
  > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
  > _______________________________________________
  > Nagios-users mailing list
  > Nagios-users at lists.sourceforge.net
  > https://lists.sourceforge.net/lists/listinfo/nagios-users




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390




More information about the Users mailing list