Skip to content

Added email groups and changed notif-profiles to selectively send to groups.#175

Open
abundy7 wants to merge 8 commits intoAcalephStorage:masterfrom
REDLattice:master
Open

Added email groups and changed notif-profiles to selectively send to groups.#175
abundy7 wants to merge 8 commits intoAcalephStorage:masterfrom
REDLattice:master

Conversation

@abundy7
Copy link

@abundy7 abundy7 commented Feb 21, 2017

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.

abundy7 and others added 8 commits February 15, 2017 23:34
…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.


# Conflicts:
#	README.md
#	check-handler.go
#	consul/client.go
#	consul/interface.go
#	notifier/email-notifier.go
#	notifier/notifier.go


# Conflicts:
#	consul/client.go
#	notifier/email-notifier.go
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

Successfully merging this pull request may close these issues.

2 participants