It appears i spoke to soon.
This behaviour is really weird and sort of erratic.

After a few reloads of Icinga2 on my master and the endpoints, i am now 
receiving notifications from my master again.
This time, master and satellite seem to take turns in sending the notifications 
(1 from the master, 1 from the satellite, and so on).

I'd really appreciate some feedback regarding this.

Regards,
Markus
-----Original message-----
From: Markus Joosten <markus.joos...@plumbe.de>
Sent: Thursday 16th April 2015 14:29
To: Icinga User's Corner <icinga-users@lists.icinga.org>
Subject: Re: [icinga-users] Restrict notifications to one specific (satellite) 
endpoint

 
Hi list,

this is just a follow-up to my previous issue with restricting notifications to 
the proper endpoints since i might have found the reason for this behaviour.

A quick recap:
- i'm running a distributed setup with a global-config zone which holds 
templates, commands and such
- the cluster master should only monitor all its child endpoints, the actual 
host and service monitoring should be performed by the endpoints in their zones
- when assigning Notification objects to hosts, the cluster master would always 
send *some* of the notifications

The workaround (by using: assign where ZoneName == ...) helped so far that the 
notifications were always sent by the correct endpoint, but without the master 
"knowing" about them.
(There was no notification object visible on the master using "icinga2 object 
list --type Notification", all GUIs always showed 0 notifications for the hosts 
and services being monitored from my satellites.)

Today i disabled the import of the mail-host-notification template (which was 
defined in my global-config zone) and voila, notifications were only sent from 
the correct endpoint.

My theory is that somehow the master thinks he is responsible for a 
notification because its template is defined in the global-config zone.
Could that be the case? Would that be a desired behaviour or a bug?

Looking forward to a reply :)

Regards,
Markus

-----Original message-----
From: Markus Joosten <markus.joos...@plumbe.de>
Sent: Monday 2nd February 2015 10:26
To: Icinga User's Corner <icinga-users@lists.icinga.org>
Subject: Re: [icinga-users] Restrict notifications to one specific (satellite) 
endpoint

 
Markus,

thanks alot for pointing me in the right direction!

Whilst using host.zone did not change the behaviour, i've been able to restrict 
the notifications to specific endpoint(s) by applying the notifications using 
constants as such:

apply Notification "host-notify-by-mail" to Host {
  [...]
  assign where host.vars.notification.mail && ZoneName == "satellite-zone-2"
}

(using NodeName instead of ZoneName works as well)

Best regards,
Markus


 
-----Original message-----
> From:Markus Frosch <mar...@lazyfrosch.de <mailto:mar...@lazyfrosch.de> >
> Sent: Saturday 31st January 2015 17:26
> To: Icinga User's Corner <icinga-users@lists.icinga.org 
> <mailto:icinga-users@lists.icinga.org> >
> Subject: Re: [icinga-users] Restrict notifications to one specific 
> (satellite) endpoint
> 
> On 31.01.2015 14:47, Markus Joosten wrote:
> > thanks alot for your response.
> > Actually i would like the master _not_ to notify for hosts in the satellite 
> > zones.
> > Only the satellite endpoints should generate alerts for the hosts in their 
> > zone.
> > 
> > The master should only generate alerts for hosts located in the parent zones
> > 
> > As i've written before, it seems to be impossible to accomplish this - the 
> > master always sends notifications for the child zones as well.
> > 
> > Unless i disable the notification on the master, which is not what i want 
> > of course.
> 
> That should be doable with different notification rules for master and
> satellite, or a const helper.
> 
> The attribute host.zone is internally set due to the zones loading.
> 
> apply Notification ... {
>   ...
>   assign where host.zone == "master"
>   //assign where host.zone == ZoneName
> }
> 
> Have not tested this!
> 
> But please try and give us feedback.
> 
> Cheers from FOSDEM :)
> Markus
> 
> -- 
> mar...@lazyfrosch.de <mailto:mar...@lazyfrosch.de> 
> http://www.lazyfrosch.de <http://www.lazyfrosch.de> 
> 
> _______________________________________________
> icinga-users mailing list
> icinga-users@lists.icinga.org <mailto:icinga-users@lists.icinga.org> 
> https://lists.icinga.org/mailman/listinfo/icinga-users
> 


_______________________________________________

icinga-users mailing list

icinga-users@lists.icinga.org

https://lists.icinga.org/mailman/listinfo/icinga-users




_______________________________________________

icinga-users mailing list

icinga-users@lists.icinga.org

https://lists.icinga.org/mailman/listinfo/icinga-users



_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to