Elastic 6.3.1 and configuring emails so Watcher can send emails rather than just exporting to the local log file

Hi. I am trying to setup email alerts for my watchers.
I have the following setup in my /etc/elasticsearch/elasticsearch.yml file:

xpack.notification.email.account: elastic@domain.com
profile: gmail
smtp.auth: true
smtp.host: smtp.gmail.com
smtp.port: 587
smtp.user: alerts@domain.com
smtp.password: apassword
smtp.starttls.enable: true
smtp.starttls.required: true

but when I go to restart elasticsearch I see this error message in the startup log and still my watcher shows email as disabled Email. Disabled. Configure elasticsearch.yml.

Suppressed: java.lang.IllegalArgumentException: unknown setting [profile] did you mean [pidfile]?
Suppressed: java.lang.IllegalArgumentException: unknown setting [smtp.user] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
Suppressed: java.lang.IllegalArgumentException: unknown setting [smtp.starttls.required] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
Suppressed: java.lang.IllegalArgumentException: unknown setting [smtp.starttls.enable] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
Suppressed: java.lang.IllegalArgumentException: unknown setting [xpack.notification.email.account] did you mean any of [xpack.notification.email.default_account, xpack.notification.jira.default_account, xpack.notification.slack.default_account]?

Any help will be greatly appreciated!

Hey,

is it possible that your indendation is wrong? Please show the exact configuration or a gist to prove this. See this documentation as an example https://www.elastic.co/guide/en/elastic-stack-overview/6.3/actions-email.html#gmail

--Alex

Ahh yes thanks.
Went by this and all good now :slight_smile: Thanks.

I got my first watcher alert via email!

https://www.elastic.co/guide/en/elastic-stack-overview/6.3/actions-email.html#gmail

#
xpack.notification.email.account:
    gmail_account:
        profile: gmail
        smtp:
            auth: true
            starttls.enable: true
            host: smtp.gmail.com
            port: 587
            user: me@mydomain.com
            password: SomePassword
1 Like

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