Configure Email using watcher


I want to setup email alerting on cluster using watcher. I have done this before on single node cluster and worked fine. Have query regarding the setup on multi node cluster.

Do i have to update the email settings on every node with password in keystore or setup will work in any one node ?
If to be done in all nodes do how do i do it, test with single node, update all node yml and rolling restart ?

Bryce Fernandes.

Yes it needs to be updated on every node. However you can use the reload secure settings API to not need to restart the node.

Hope this helps!

Hi @spinscale,

That was the fastest reply on forum for queries I have posted.

So the process will be as follows:

1.Update email setting in every node yml.
2.Update keystore on all nodes.
3.Reload keystore using reload secure settings API.

Let me know if different.

Bryce Fernandes.


sorry, I was not fully clear. Let me retry:

First, if you change anything in the YAML file, you need to reload Elasticsearch. If you do not want to do that, you can use the Cluster Update Settings API (must be persistent). Most of the settings need to be set with a single API call once for all nodes, as this is part of the cluster state then. See Watcher settings in Elasticsearch | Elasticsearch Guide [7.14] | Elastic

However some settings are considered to be more secure (like your passwords for the email accounts), and those need to be set within the keystore.

So, I would do:

  1. Adding secure settings like passwords to all keystores on all nodes
  2. running cluster update settings API
  3. reload secure settings
  4. Using the execute watch api to send an email to see if it works

Hope that helps!


1 Like

Great!! Clear now.
Thanks!! :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.