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

Feature Request: Check and Host Annotations Support #46

Open
seifer44 opened this issue Mar 24, 2020 · 2 comments
Open

Feature Request: Check and Host Annotations Support #46

seifer44 opened this issue Mar 24, 2020 · 2 comments

Comments

@seifer44
Copy link

The ability to add in recipients to a single email by appending them onto the To, CC, or BCC field, would be beneficial. Utilizing check or host annotations would probably be a good way to do this. This would allow teams and users to "subscribe" to the handlers in a more flexible way, and would cut down on the number of separate handlers that may, otherwise, be required.

annotations:
  sensu.io.plugins.email.config.ccEmail: [email protected]
  sensu.io.plugins.email.config.toEmail: [email protected]
  sensu.io.plugins.email.config.bccEmail: [email protected]

Example: Disk checks normally go to the server team, but teamWidget would like to be CCed onto disk check alerts for their servers only. Their servers could have client annotations set up, without requiring separate checks and handlers to be configured.

The appending portion of this feature request this may conflict with the override behavior currently exhibited in filtering. Regardless, annotation support of any sort would be a nice feature.

The downside to this approach is in the event you have 2+ email handlers already configured for a check. Both handlers would look at the annotation configuration above, and the annotated recipients may receive two or more email notifications, instead of one. This could be avoided by having a sensu.io.plugins.email.config.handlerName configuration available in the annotations, but then this approaches another complex way of setting up the same thing normal handlers are designed for.

This is a good discussion piece, if nothing else :)

@hurrycaine
Copy link
Contributor

This sounds similar to the contact routing guide here.

You do need multiple handlers and filters but it does use the annotations. Basically you have a handler set that encapsulates all your email handlers. The checks reference the handler set. The filters are on the handlers and allow it to proceed to the handler if the contact is in the annotations.

@seifer44
Copy link
Author

That's a very good point, but it would still trigger separate emails out to different teams/individuals. Sending a single email out, but adding on a CC field, would be beneficial.

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

No branches or pull requests

2 participants