Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #12777] Allow notifications to pick user(groups) from host/service vars #462

Closed
icinga-migration opened this issue Sep 23, 2016 · 3 comments
Assignees
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/12777

Created by tgelf on 2016-09-23 14:45:20 +00:00

Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-09-23 14:45:20 +00:00 (in Redmine)


As we are now able to fill custom arrays with Icinga object name through the DirectorObject data type, I'd love to be able to define the following directly through the Director:

apply Notification "Send Mails for Hosts to their contact groups" to Host {
  import "mail-host-notification"
  user_groups = host.vars.contact_groups
  assign where host.vars.contact_groups
}

apply Notification "Send Mails for Services to their contact groups" to Service {
  import "mail-service-notification"
  user_groups = service.vars.contact_groups
  assign where service.vars.contact_groups
}
@chas0rde
Copy link

Would also love that.
We configure Responsible, Deputy and "others to inform" (array) via Director on hosts and services.
It would be great to be able to have less (rather than per-user) notification objects in director in this way.

E.g. something like "notify-host-mail" with Users "$host.vars.responsible$" and assign where $host.vars.responsible != "" would be nice.

This way we could reduce the number of notification objects in director to 6 per media instead of 2 per media per user (which totals with e.g. 50 users to 6 instead of 100 notifications per media)
"media" being e.g. mail, sms, telegram...

@Thomas-Gelf
Copy link
Contributor

This is now going to happen 🎉

@Thomas-Gelf
Copy link
Contributor

Notification Configuration

grafik

Rendered Icinga Configuration

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants