> On 2 Mar 2017, at 09:33, Christian Moreno Moreno <christian.mor...@idealo.de> 
> wrote:
> 
> Hi,
> 
> We have one mail contact for the mail notifications and other for the sms 
> notifications, but now we would like get the mail notifications only if the 
> services has our sms contact defined.
> Something like:
> 
> apply Notification "mail-icingaadmin" to Host {
>   import "mail-host-notification"
> 
>   interval = 0 // re-notification disabled
> 
>   users = host.vars.notification.mail.users
> 
>   if ("it-ops-mail" in host.vars.notification.mail.users ) && 
> (host.vars.notification.sms.users != "bereitschaft_sms" ) {
> 
>     enable_notifications = false
>   }
> 
>   assign where host.vars.notification.mail
> }
> 
> I think that this would runs... but then, if the host/service would have one 
> second contact for the mail notification, then they would get it too.
> 
> Is possible to delete/extract via Apply one contact?

How do the host objects look like?

Kind regards,
Michael

> 
> 
> alternative is change via Script all config files...
> 
> Regards,
> Christian
> 
> Christian Moreno Moreno
> System Engineer Offers
> 
> idealo internet GmbH
> Ritterstraße 11
> 10969 Berlin, Deutschland
> Tel.: +49 (0)30 40 30 10 33
> Fax: +49 (0)30 221 94 33 - 21
> E-Mail: christian.mor...@idealo.de
> Geschäftsführer:
> Dr. Albrecht von Sonntag, Dr. Philipp-Christopher Peitsch
> HRB 76749 – Amtsgericht Berlin-Charlottenburg
> 
> 
> 
> 
> 
> _______________________________________________
> 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