Create email templates for use with LEM rules
Email templates are pre-formatted messages that LEM sends to users when alert events trigger a rule.
If you have not yet configured LEM to connect to your mail server, see Set up LEM to send Email Alerts to configure it now.
About LEM email templates
You can use email templates to customize your email notifications when triggered as responses in your rules. An email template includes static and dynamic text (or parameters). The static text lets you customize the appearance of the email. The dynamic text is filled in from the original event that triggered the rule to fire.
Create email templates to report specific information about an alert event and variables that capture specific parameters about that event. For example, you can report which server is affected, what time the event occurred, or which Agent was shut down. Or you can create an Account Lockout template to notify key personnel when an account is locked out, or automatically file a trouble ticket. Create static text to describe the event, and incorporate dynamic text that provides the account information from the original event.
Create templates that are specific to an event type to avoid having to create one email template per rule. For example, you can have one template for Account Modification that can provide a notification when a user is added or removed from a group, when a password is reset, or when other account details are changed. There is no limit to the number of templates you can create.
Managing email templates and template folders
You can organize your email templates into folders and sub-folders. Manage templates and folders using the following operations:
- Email templates – You can add, edit, clone, and delete templates, and organize them into folders.
- Template folders – You can add, rename, move, and delete template folders as needed.
Best practices to keep rules, events, and emails simple to manage
To keep rules, events, and emails simple to manage, SolarWinds recommends the following:
- Create the rule with a name that describes the event.
- Create the email template with a name that describes the event.
- In the email template subject or message, enter the event or rule name to describe the event or alert.
When you receive the email, you can identify the email template, the rule that fired, and the event that caused the rule to fire.
Create or edit an email template
On the LEM toolbar, navigate to Build > Groups.
In the Groups grid, click and select Email Template, or select one of the existing email templates.
The Email Template form displays.
If you are editing an existing template, the form shows the parameters that are configured for the template. Clone the template, and then modify the name and parameters of the template.
Complete the Email Template form.
In the Details pane, enter a template name.
This will be used in rules to reference the template.
- To create dynamic text (parameters) for the rule:
Type a name in the Name field under the Parameters list and click .
DetectionIP, DestinationAccount, EventInfo, and so on. This name is a reference to the actual event data.
Repeat this for all the parameters you want to add.
Each parameter is a variable that holds your data and places it in the right location in the email. For example, for an Account Lockout template, consider using the Time, Account, DC, and Machine parameters.
Field Description LEM Manager menu (unlabeled) Select the LEM Manager that will host the template. If you are editing an existing template, this field displays the Manager associated with the template. Name Enter a name for the template. The name will be used in rules to reference the template. The name should describe the event that occurred or the destination of the email message. From Enter who sent the message. For example, you can enter
Enter a subject for the message. The subject should indicate the nature of the alert event.
To use a Parameter, enter the name as it appears in the parameters list, including the dollar sign, or drag it from the Parameters list into where you want it to appear in the subject.
Using a dynamic Parameter in the Subject provides a subject that includes the user account name, source, or any other text from the originating event.
Enter the email message that LEM sends when an event occurs. Select and drag a parameter from the Parameters list to the appropriate place in the message text. Parameters serve as placeholders for information that LEM Manager fills in when the email is sent.
You can use a combination of static and dynamic text, such as
Account $Account locked out at $Time on DC $DC from computer $Machine. This would display the following:
Account testuser locked out at 7/21/2016 8:05am on DC DC1 from computer PC1
Lists the variables that provide placeholders for specific items within the message text. When LEM sends the message, LEM Manager prompts you to fill in the message variables from the Events or Event Groups lists. LEM then completes the message by filling in the variable parameters with the appropriate text. You can create a variable for Agents, servers, or time, and you can add as many parameters as you need. For example, you may want to add a parameter to be filled in with the affected Agent or server name, and another parameter to be filled in with the time the event occurred.
To add and delete parameters, use the controls in the Name row at the bottom of the screen.
To add a message parameter to the email template, enter the parameter name and click . Add additional parameters as needed for use with the message.
To delete a message parameter from the template, select the parameter that you want to delete and then click .
To save the template, click Save.
The Email template is added to the Groups grid and will be available in the Actions component list when you drag Send Email Message or Send Pager Message to the Actions box. LEM will prompts you to fill in the message variables from the Events or Event Groups lists.