Configuring Emails Template 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.
Emails Template Config Syntax and Tags
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. This emails-template.xml
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>
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.
After you are done editing this file for custom email templates, 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