Configuring Emails for Cache Event Notifications
You can configure Emails for Cache Event Notifications in NCache. NCache will send you an email automatically when a selected event occurs in the cache for which you have enabled notification. You can configure email notification for a cache in the following ways:
Using the NCache Management Center for Default Email Alerts
Launch the NCache Management Center by browsing to http://localhost:8251 or
<server-ip>:8251
on Windows and Linux.In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to configure.
Against the cache name, click on View Details.
This opens up the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Email Alerts in the left bar.
Check the Enable Email Notifications checkbox, to enable the email notification feature.
Under Email Settings, enter the sender's email in the Sender Email text box.
Enter the SMTP server in the SMTP Server text box.
Enter Port in the Port text box.
Check TLS check box, if your email server requires TLS authentication.
Check the Authentication Required check box if required and enter login and password in the Login text box and Password text boxes respectively.
Specify recipients’ email addresses in the Email Address text box and click on +.
Check the cache events for which you want to receive notifications from NCache.
- Click on Save Changes to apply this configuration to the cache.
Using the Config File for Customized Email Alerts
Note
This feature is for Enterprise Edition only.
You have the option of customizing the emails that you receive by deciding the subject and text of the email. You can use the emails-template.xml file placed in the %NCHOME%\config
folder to edit the text as per your requirement. Go to the Emails Template to understand the parameters of this file in detail.
- Write the subject and text of each email alert against the
subject
andtext
parameters.
Important
The {NodeIP}
and {CacheName}
variables must stay as is as these values will be populated at runtime by NCache service.
<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="cache-stop" subject="On cache stop" text="The cache {CacheName} has stopped successfully"/>
</alerts>
Note
The name
parameter cannot be changed. To get a detailed idea about the parameters of this file, refer to the Emails Template.
Save the
emails-template.xml
file after making the desired changes.Go to the NCache Management Center and enable Email Alerts for your customized settings to take effect.
See Also
Register Non-Generic Classes
Register Generic Classes
Register Generic Classes using Generic Type Handler
Register Classes for Portable Data Sharing