Welcome back to my series on using Foglight services to put your monitored objects into meaningful groups. These may be applications, teams, or production vs. development, and in the rest of this series we will investigate what we can do with these services once we’ve created them. In this exciting episode, we’re going to use our service to route alarm emails. If you haven’t built a service yet, check out the first part of the series.
Very quick one this time: one of the quickest to setup features of services is the distribution of email. By default in Foglight many rules come configured with an email action which sends an email to an address defined in the registry. Previously it was a little cumbersome to configure email actions that would be distributed to different people based on the application, or grouping, or location. Using services the development team have found a way around this.
Configuring email routing
In order to route email, all you have to do is build a service (which we did in episode one of this increasingly inaccurately titled mini-series) and then click the icon in the “email” column in the service builder. This gives you a popup that you can enter your address (or multiple addresses by separating with commas) and if you like test with the test button.
When you are satisfied, click Save, and you’re done!
Note, if you get the error message that I have in the picture above, then you haven’t configured your mail server, you need to set the mail.host registry variable and confirm that it is all working (you can also use the email configuration screen in administration-> setup and support).
What will you receive?
You may expect to receive an email for each alert that is raised within your service. However Foglight actually sends you a summary of alarms after a certain period of time, so if there have been 3 alarms since it last sent you an email you will receive a message with the subject line “3 new alarms on service [service name]” and a summary for each alarm will be in the body of the message. These are sent in addition to the traditional rule action messages. If you want to stop receiving them you can reset the various recipient email addresses in the email configuration screen (administration – setup & support- email configuration).
This post is part of a mini series on Foglight Services, the complete listing for this series can be found on the services contents page.