Unable to configure new watch from Kibana, getting E-mail Disabled. Configure elasticsearch.yml

Applied the email settings using cluster update settings API and able to send mails when set up a custom watch using raw JSON. Here's screen shot of cluster settings:

Taking cue from this this thread, I am assuming, this shall enable to set up watch from Kibana to send mails on alerts.
(I have restarted the cluster also)

But if I create a watch from Kibana, I still see this:

E-mail
Disabled. Configure elasticsearch.yml

Please let me know if my approach is right or something missing here?

P.S: we would prefer to set the mail/hipchat settings etc. via API than changing the elasticsearch.yml file

Thanks in advance for help.

Still not able to get it working, would appreciate any help from ELK team.

Thanks

can you plz check if you have configured the email settings correctly in elasticsearch.yml ? To send email, you must configure at least one email account in elasticsearch.yml.

Reference: https://www.elastic.co/guide/en/x-pack/current/actions-email.html#configuring-email

Once set, you would have to restart all the nodes for this change to take effect.
you might want to check the node kibana connects to first in this case.

More logs, screenshots help.

I tried gmail settings in elasticsearch.yml and successfully get email notifications .

Cheers
Rashmi

Please understand my question, we don't want to store & set such settings in elasticsearch.yml file, as it cumbersome and another management/restart overhead.
So, that's why, taking the route of setting them up via Update API setting, as mentioned in this thread

If you do not fancy restarts and do not want to store these settings in the yaml file, you can also use the cluster update settings API 6 to add a new email account. This also has the advantage, that it gets distributed to all nodes without you having to do anything.

So want to understand is update API not the right way of setting it up and only way it via setting it up in 'elasticsearch.yml' the only way to set mail alerts in Kibana ?

Thanks

Just to make sure everything has been setup correctly, you can see those settings when you are receiving cluster settings?

Also, when you try to send an email by just putting a watch like this

POST _xpack/watcher/watch/_execute
{
  "watch": {
    "trigger": {
      "schedule": {
        "interval": "10h"
      }
    },
    "input": {
      "simple": {
      }
    },
    "actions": {
      "email": {
        "email": {
          "to": "foo@example.org",
          "subject": "subject",
          "body": {
            "html": "HTML"
          }
        }
      }
    }
  }
}

If the above works in the console, we have a UI issue here. I will check if that is the case, but that's an easy way to check yourself.

Ok, so here I will answer in sequence as it happened:

  1. you can see those settings when you are receiving cluster settings?
    ans: yes, i can see the applied settings, here's a screen shot of the same:

  2. when you try to send an email by just putting a watch?
    ans: when I set up a json watch from console, the mails are sent fine.

  3. What does not work?
    ans: when I try to configure alerts from Kibana UI, for email option, I see this:

E-mail
Disabled. Configure elasticsearch.yml

P.S: I have even tried by restarting the server, but still its disabled.


So if its a UI issue on Kibana, is there a workaround or some quick fix to get it to work?

Please understand we are targeting both IT and business users here to on board ELK stack, and business users may not be very comfortable with setting up alerts via json configs.

thanks

Thanks @Deepak_Singh.

This is indeed a UI bug. I created https://github.com/elastic/kibana/issues/19120 for tracking purposes. I also opened a PR this morning to address this

Thanks @chrisronline, glad that I could contribute, though just by finding a bug :wink:
If I may ask, is there any time line that we can expect for this to be fixed?

Timelines are always a bit tricky, but track the issue for which release it's slated for and keep an eye out for that release

Thanks, will keep a watch on it.
Till this get fixed, the only way to set email watches is by settings email account in elasticsearch.yml OR is there any workaround possible with out fiddling with elasticsearch.yml file?

Unfortunately, no. The only way to get it to work right now is to update the elasticsearch.yml file directly.

Hi @chrisronline,

I see that the above mentioned bug has been closed.
So can you advise on when/in which version this fix will be released or how can we take in this change in our ELK installations?

Thanks

Would appreciate your response on when/in which version this fix will be released or how can we take in this change in our ELK installations?

Thanks

The change should be available in 6.4 release.

Here is the PR that added the fix: https://github.com/elastic/kibana/pull/19121

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