Added email groups and changed notif-profiles to selectively send to groups.#175
Open
abundy7 wants to merge 8 commits intoAcalephStorage:masterfrom
Open
Added email groups and changed notif-profiles to selectively send to groups.#175abundy7 wants to merge 8 commits intoAcalephStorage:masterfrom
abundy7 wants to merge 8 commits intoAcalephStorage:masterfrom
Conversation
…aking a list to having nested keys with a list for their values. The NotifProfile was changed to use the new receiver types as well. See the updated README.md file for information.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We had the desire to send some alerts (such as disk 80% full) only to admins, and send other alerts (such as API is down) to admins and customers. This has be achieved by changing the email Receivers in the Key/Value store from a JSON Array to a Folder with nested Keys that represent email groups, and values that are Lists of receivers for the given group. For example:
...
receivers/
admins --> ["admin1@example.com", "admin2@example.com"],
customers --> ["customer1@somecompany.com", "customer2@anothercompany.com"]
...
The code was updated to handle this different Key/Value setup, with the majority of the changes being the email-notifier needing to filter messages before sending. Basically, the existing Notify function was wrapped in a loop that goes through the email groups. In order to keep the wrapped code from getting difficult to read, the Notify function was broken into a few smaller functions.