Watcher Settings in Elasticsearch

You configure xpack.notification settings in elasticsearch.yml to
send set up Watcher and send notifications via email,
HipChat, Slack, and PagerDuty.

General Watcher Settings

xpack.watcher.enabled

Set to false to disable Watcher on the node.

xpack.watcher.history.cleaner_service.enabled

Set to false (default) to disable the cleaner service. If this setting is
true, the xpack.monitoring.enabled setting must also be set to true. The
cleaner service removes previous versions of Watcher indices (for example,
.watcher-history*) when it determines that they are old. The duration of
Watcher indices is determined by the xpack.monitoring.history.duration
setting, which defaults to 7 days. For more information about that setting,
see Monitoring Settings.
[5.6.4]
Added in 5.6.4.

xpack.http.proxy.host

Specifies the address of the proxy server to use to connect to HTTP services.

xpack.http.proxy.port

Specifies the port number to use to connect to the proxy server.

xpack.http.default_connection_timeout

The maximum period to wait until abortion of the request, when a
connection is being initiated.

xpack.http.default_read_timeout

The maximum period of inactivity between two data packets, before the
request is aborted.

Watcher TLS/SSL Settings

You can configure the following TLS/SSL settings. If the settings are not configured,
the Default TLS/SSL Settings
are used.

Watcher TLS/SSL Key and Trusted Certificate Settings

The following settings are used to specify a private key, certificate, and the
trusted certificates that should be used when communicating over an SSL/TLS connection.
If none of the settings below are specified, the Default TLS/SSL Settings are used.
A private key and certificate are optional and would be used if the server requires client authentication for PKI
authentication.
If none of the settings below are specified, the Default TLS/SSL Settings are used.

PEM Encoded Files

When using PEM encoded files, use the following settings:

xpack.http.ssl.key

Path to a PEM encoded file containing the private key.

xpack.http.ssl.key_passphrase

The passphrase that is used to decrypt the private key. This value is optional
as the key might not be encrypted.

Email Notification Settings

You can configure the following email notification settings in
elasticsearch.yml. For more information about sending notifications
via email, see Configuring Email.

xpack.notification.email.account

Specifies account information for sending notifications via email. You
can specify the following email account attributes:

profile

The email profile to use to build the MIME
messages that are sent from the account. Valid values: standard, gmail and
outlook. Defaults to standard.

email_defaults.*

An optional set of email attributes to use as defaults
for the emails sent from the account. See
Email Action Attributes for the supported attributes.

smtp.auth

Set to true to attempt to authenticate the user using the
AUTH command. Defaults to false.

smtp.host

The SMTP server to connect to. Required.

smtp.port

The SMTP server port to connect to. Defaults to 25.

smtp.user

The user name for SMTP. Required.

smtp.password

The password for the specified SMTP user.

smtp.starttls.enable

Set to true to enable the use of the STARTTLS
command (if supported by the server) to switch the connection to a
TLS-protected connection before issuing any login commands. Note that
an appropriate trust store must configured so that the client will
trust the server’s certificate. Defaults to false.

smtp.*

SMTP attributes that enable fine control over the SMTP
protocol when sending messages. See
com.sun.mail.smtp
for the full list of SMTP properties you can set. Note that all timeouts
(writetimeout, connection_timeout and timeout) default to 2 minutes.

xpack.notification.email.html.sanitization.allow

Specifies the HTML elements that are allowed in email notifications. For more
information, see
Configuring HTML Sanitization Options.
You can specify individual HTML elements and the following HTML feature groups: