Configuring Email 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
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.
Select the Enable Email Notifications Selectbox, 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.
Select TLS checkbox, if your email server requires TLS authentication.
Select the Authentication Required checkbox, if required and enter login and password in the Login and Password text boxes respectively.
Specify recipients’ email addresses in the Email Address text box and click on
.
Select the cache events for which you want to receive notifications from NCache.
- Click on Save Changes present at the bottom of the page to apply this configuration to the cache.
Manually Editing NCache Configuration
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 the NCache Service.
<alerts>
<alert name="cache-start" subject="On cache start" text="The cache {CacheName} has started successfully"/>
<alert name="state-transfer-started" subject="On state transfer start" text="The cache {CacheName} has started state transfer"/>
</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