Emails Template Config for Cache Event Notifications
NCache allows you to enable email alerts for various events to help you monitor the state of your cache cluster. You can enable email alerts against selective events from the NCache Management Center. These emails are automatically generated by NCache using the default email template. NCache also allows you to configure customized email templates. You get to decide what the subject and the text of the email needs to be for every event that occurs.
Note
This feature is for NCache Enterprise only.
When you install NCache, an emails-template.xml file is shipped in the %NCHOME%\config
folder. This file provides you with a template that you can customize for your email notifications.
Emails Template Config Syntax
The emails template configuration file is explained below.
<alerts>
<alert name="node-join" subject="On node join" text="The node {NodeIP} has joined the cache cluster {CacheName}"/>
<alert name="node-leave" subject="On node leave" text="The node {NodeIP} has left the cache cluster {CacheName}"/>
<alert name="partial-connectivity-detected" subject="On split brain" text="... {CacheName}"/>
<alert name="cache-stop" subject="On cache stop" text="The cache {CacheName} has stopped successfully"/>
<alert name="cache-start" subject="On cache start" text="The cache {CacheName} has started successfully"/>
<alert name="cache-size" subject="On cache size exceed" text="The cache {CacheName} size has exceeded"/>
<alert name="state-transfer-error" subject="On state transfer error" text="The cache {CacheName} has ended state transfer prematurely"/>
<alert name="state-transfer-stop" subject="On state transfer stop" text="The cache {CacheName} has completed state transfer"/>
<alert name="state-transfer-started" subject="On state transfer start" text="The cache {CacheName} has started state transfer"/>
</alerts>
Understanding the Emails Template Config Tags
The following section explains the tags mentioned as part of the file syntax.
- alert: Specifies the details of the email sent against a particular event.
- name: Specifies the name of the event against which email notification need to be sent. You cannot change the name of the event.
- subject: Specifies the subject of the email. You can customize the subject of an email using this parameter.
- text: Specifies the textual body of the email. You can customize this text as per your requirement.
Important
The {NodeIP} and {CacheName} variables should stay as is as they will be automatically populated at runtime.
Once the email templates are configured, you need to enable Email Alerts from the NCache Management Center for this change to take effect. See Configure Email Notifications to know how to enable email alerts.
See Also
Email Notifications on NCache Events
Configure Email Notifications
Monitor Cache using Email Alerts