Email watcher setup - fail

I am new to WATHER and looking to setup an email triggers for the watchers.

Configured my elasticsearch.yaml as directed from (https://www.elastic.co/guide/en/x-pack/6.2/actions-email.html#outlook) using outlook.

Below is the config I used to configure

xpack.notification.email.account:
outlook_account:
profile: outlook
smtp:
auth: true
starttls.enable: true
host: mail.support.local
port: 25
user: support@myorganization.com
password: <pa$$w0rd>

But attached is the error i am get when starting my Elasticsearch.

Hey,

a couple of things:

  1. Please don't use screenshots, it's nearly impossible to read. Always paste snippets
  2. When using snippets like for configurations, use markdown in here, as this makes it much more readable and the formatting remains as well (which is crucial for YAML).
  3. Have you installed the x-pack plugin. You seem to run Elasticsearch 6.2, where you needed to install that plugin manually. From Elasticsearch 6.3 onwards x-pack is always shipped, so you should probably upgrade

Thanks Spinscale for a very quick response.

I am using Elasticsearch 7.5, so I would guess the x-pack plugin must be installed by default.

Here are my configurations

xpack.notification.email.account:
outlook_account:
profile: outlook
smtp:
auth: true
starttls.enable: true
host: mail.support.local
port: 25
user:support@myorganization.com
password: <pa$$w0rd>

and the error message is as below

elasticsearch     | {"type": "deprecation", "timestamp": "2020-02-19T13:07:31,467Z", "level": "WARN", "component": "o.e.d.c.s.Settings", "cluster.name": "docker-cluster", "node.name": "afd2f30f327e", "message": "[xpack.watcher.history.cleaner_service.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version." }
elasticsearch     | {"type": "server", "timestamp": "2020-02-19T13:07:31,472Z", "level": "WARN", "component": "o.e.b.ElasticsearchUncaughtExceptionHandler", "cluster.name": "docker-cluster", "node.name": "afd2f30f327e", "message": "uncaught exception in thread [main]", 
elasticsearch     | "stacktrace": ["org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [xpack.notification.email.account.outlook_account.smtp.password] please check that any required plugins are installed, or check the breaking changes documentation for removed settings",
elasticsearch     | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:125) ~[elasticsearch-cli-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "Caused by: java.lang.IllegalArgumentException: unknown setting [xpack.notification.email.account.outlook_account.smtp.password] please check that any required plugins are installed, or check the breaking changes documentation for removed settings",
elasticsearch     | "at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:530) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:475) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:446) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:417) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:149) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.node.Node.<init>(Node.java:352) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.node.Node.<init>(Node.java:253) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:221) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:221) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:349) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-7.5.0.jar:7.5.0]",
elasticsearch     | "... 6 more"] }

Hey,

thank you. It'd be great to fix the indendation issues with the YAML file (as indendation is crucial), but I think I know what the issue is.

Instead of using the password setting in the YAML file, you need to setup a keystore and use the secure_password setting in there.

See https://www.elastic.co/guide/en/elasticsearch/reference/7.6/actions-email.html

--Alex

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