notification-settings.asciidoc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. [role="xpack"]
  2. [[notification-settings]]
  3. === {watcher} settings in Elasticsearch
  4. ++++
  5. <titleabbrev>{watcher} settings</titleabbrev>
  6. ++++
  7. You configure {watcher} settings to set up {watcher} and send notifications via
  8. <<email-notification-settings,email>>,
  9. <<slack-notification-settings,Slack>>, and
  10. <<pagerduty-notification-settings, PagerDuty>>.
  11. All of these settings can be added to the `elasticsearch.yml` configuration file,
  12. with the exception of the secure settings, which you add to the {es} keystore.
  13. For more information about creating and updating the {es} keystore, see
  14. <<secure-settings>>. Dynamic settings can also be updated across a cluster with the
  15. <<cluster-update-settings,cluster update settings API>>.
  16. [float]
  17. [[general-notification-settings]]
  18. ==== General Watcher Settings
  19. `xpack.watcher.enabled`::
  20. Set to `false` to disable {watcher} on the node.
  21. `xpack.watcher.encrypt_sensitive_data`::
  22. Set to `true` to encrypt sensitive data. If this setting is enabled, you
  23. must also specify the `xpack.watcher.encryption_key` setting. For more
  24. information, see
  25. {xpack-ref}/encrypting-data.html[Encrypting sensitive data in {watcher}].
  26. `xpack.watcher.encryption_key` (<<secure-settings,Secure>>)::
  27. Specifies the path to a file that contains a key for encrypting sensitive data.
  28. If `xpack.watcher.encrypt_sensitive_data` is set to `true`, this setting is
  29. required. For more information, see
  30. {xpack-ref}/encrypting-data.html[Encrypting sensitive data in {watcher}].
  31. `xpack.watcher.history.cleaner_service.enabled`::
  32. added[6.3.0,Default changed to `true`.]
  33. deprecated[7.0.0,Watcher history indices are now managed by the `watch-history-ilm-policy` ILM policy]
  34. +
  35. Set to `true` (default) to enable the cleaner service. If this setting is
  36. `true`, the `xpack.monitoring.enabled` setting must also be set to `true` with
  37. a local exporter enabled. The cleaner service removes previous versions of
  38. {watcher} indices (for example, `.watcher-history*`) when it determines that
  39. they are old. The duration of {watcher} indices is determined by the
  40. `xpack.monitoring.history.duration` setting, which defaults to 7 days. For
  41. more information about that setting, see <<monitoring-settings>>.
  42. `xpack.http.proxy.host`::
  43. Specifies the address of the proxy server to use to connect to HTTP services.
  44. `xpack.http.proxy.port`::
  45. Specifies the port number to use to connect to the proxy server.
  46. `xpack.http.default_connection_timeout`::
  47. The maximum period to wait until abortion of the request, when a
  48. connection is being initiated.
  49. `xpack.http.default_read_timeout`::
  50. The maximum period of inactivity between two data packets, before the
  51. request is aborted.
  52. `xpack.http.max_response_size`::
  53. Specifies the maximum size an HTTP response is allowed to have, defaults to
  54. `10mb`, the maximum configurable value is `50mb`.
  55. `xpack.http.whitelist`::
  56. A list of URLs, that the internal HTTP client is allowed to connect to. This
  57. client is used in the HTTP input, the webhook, the slack, pagerduty,
  58. and jira actions. This setting can be updated dynamically. It defaults to `*`
  59. allowing everything. Note: If you configure this setting and you are using one
  60. of the slack/pagerduty actions, you have to ensure that the
  61. corresponding endpoints are whitelisted as well.
  62. [[ssl-notification-settings]]
  63. :ssl-prefix: xpack.http
  64. :component: {watcher}
  65. :verifies:
  66. :server!:
  67. include::ssl-settings.asciidoc[]
  68. [float]
  69. [[email-notification-settings]]
  70. ==== Email Notification Settings
  71. You can configure the following email notification settings in
  72. `elasticsearch.yml`. For more information about sending notifications
  73. via email, see {xpack-ref}/actions-email.html#configuring-email-actions[Configuring Email].
  74. `xpack.notification.email.account`::
  75. Specifies account information for sending notifications via email. You
  76. can specify the following email account attributes:
  77. [[email-account-attributes]]
  78. `profile` (<<cluster-update-settings,Dynamic>>);;
  79. The {xpack-ref}/actions-email.html#configuring-email[email profile] to use to build the MIME
  80. messages that are sent from the account. Valid values: `standard`, `gmail` and
  81. `outlook`. Defaults to `standard`.
  82. `email_defaults.*` (<<cluster-update-settings,Dynamic>>);;
  83. An optional set of email attributes to use as defaults
  84. for the emails sent from the account. See {xpack-ref}/actions-email.html#email-action-attributes[
  85. Email Action Attributes] for the supported attributes.
  86. `smtp.auth` (<<cluster-update-settings,Dynamic>>);;
  87. Set to `true` to attempt to authenticate the user using the
  88. AUTH command. Defaults to `false`.
  89. `smtp.host` (<<cluster-update-settings,Dynamic>>);;
  90. The SMTP server to connect to. Required.
  91. `smtp.port` (<<cluster-update-settings,Dynamic>>);;
  92. The SMTP server port to connect to. Defaults to 25.
  93. `smtp.user` (<<cluster-update-settings,Dynamic>>);;
  94. The user name for SMTP. Required.
  95. `smtp.secure_password` (<<secure-settings,Secure>>);;
  96. The password for the specified SMTP user.
  97. `smtp.starttls.enable` (<<cluster-update-settings,Dynamic>>);;
  98. Set to `true` to enable the use of the `STARTTLS`
  99. command (if supported by the server) to switch the connection to a
  100. TLS-protected connection before issuing any login commands. Note that
  101. an appropriate trust store must configured so that the client will
  102. trust the server's certificate. Defaults to `false`.
  103. `smtp.starttls.required` (<<cluster-update-settings,Dynamic>>);;
  104. If `true`, then `STARTTLS` will be required. If that command fails, the
  105. connection will fail. Defaults to `false`.
  106. `smtp.ssl.trust` (<<cluster-update-settings,Dynamic>>);;
  107. A list of SMTP server hosts that are assumed trusted and for which
  108. certificate verification is disabled. If set to "*", all hosts are
  109. trusted. If set to a whitespace separated list of hosts, those hosts
  110. are trusted. Otherwise, trust depends on the certificate the server
  111. presents.
  112. `smtp.timeout` (<<cluster-update-settings,Dynamic>>);;
  113. The socket read timeout. Default is two minutes.
  114. `smtp.connection_timeout` (<<cluster-update-settings,Dynamic>>);;
  115. The socket connection timeout. Default is two minutes.
  116. `smtp.write_timeout` (<<cluster-update-settings,Dynamic>>);;
  117. The socket write timeout. Default is two minutes.
  118. `smtp.local_address` (<<cluster-update-settings,Dynamic>>);;
  119. A configurable local address when sending emails. Not configured by default.
  120. `smtp.local_port` (<<cluster-update-settings,Dynamic>>);;
  121. A configurable local port when sending emails. Not configured by default.
  122. `smtp.send_partial` (<<cluster-update-settings,Dynamic>>);;
  123. Send an email, despite one of the receiver addresses being invalid.
  124. `smtp.wait_on_quit` (<<cluster-update-settings,Dynamic>>);;
  125. If set to false the QUIT command is sent and the connection closed. If set to
  126. true, the QUIT command is sent and a reply is waited for. True by default.
  127. `xpack.notification.email.html.sanitization.allow`::
  128. Specifies the HTML elements that are allowed in email notifications. For
  129. more information, see {xpack-ref}/actions-email.html#email-html-sanitization[Configuring HTML
  130. Sanitization Options]. You can specify individual HTML elements
  131. and the following HTML feature groups:
  132. [[html-feature-groups]]
  133. `_tables`;;
  134. All table related elements: `<table>`, `<th>`, `<tr>`
  135. and `<td>`.
  136. `_blocks`;;
  137. The following block elements: `<p>`, `<div>`, `<h1>`,
  138. `<h2>`, `<h3>`, `<h4>`, `<h5>`, `<h6>`, `<ul>`, `<ol>`,
  139. `<li>`, and `<blockquote>`.
  140. `_formatting`;;
  141. The following inline formatting elements: `<b>`, `<i>`,
  142. `<s>`, `<u>`, `<o>`, `<sup>`, `<sub>`, `<ins>`, `<del>`,
  143. `<strong>`, `<strike>`, `<tt>`, `<code>`, `<big>`,
  144. `<small>`, `<br>`, `<span>`, and `<em>`.
  145. `_links`;;
  146. The `<a>` element with an `href` attribute that points
  147. to a URL using the following protocols: `http`, `https`
  148. and `mailto`.
  149. `_styles`;;
  150. The `style` attribute on all elements. Note that CSS
  151. attributes are also sanitized to prevent XSS attacks.
  152. `img`;;
  153. `img:all`;;
  154. All images (external and embedded).
  155. `img:embedded`;;
  156. Only embedded images. Embedded images can only use the
  157. `cid:` URL protocol in their `src` attribute.
  158. `xpack.notification.email.html.sanitization.disallow`::
  159. Specifies the HTML elements that are NOT allowed in email notifications.
  160. You can specify individual HTML elements and <<html-feature-groups,
  161. HTML feature groups>>.
  162. `xpack.notification.email.html.sanitization.enabled` ::
  163. Set to `false` to completely disable HTML sanitation. Not recommended.
  164. Defaults to `true`.
  165. [float]
  166. [[slack-notification-settings]]
  167. ==== Slack Notification Settings
  168. You can configure the following Slack notification settings in
  169. `elasticsearch.yml`. For more information about sending notifications
  170. via Slack, see {xpack-ref}/actions-slack.html#configuring-slack-actions[Configuring Slack].
  171. `xpack.notification.slack` ::
  172. Specifies account information for sending notifications
  173. via Slack. You can specify the following Slack account attributes:
  174. [[slack-account-attributes]]
  175. `secure_url` (<<secure-settings,Secure>>);;
  176. The Incoming Webhook URL to use to post messages to Slack. Required.
  177. `message_defaults.from`;;
  178. The sender name to display in the
  179. Slack message. Defaults to the watch ID.
  180. `message_defaults.to`;;
  181. The default Slack channels or groups you
  182. want to send messages to.
  183. `message_defaults.icon`;;
  184. The icon to display in the Slack messages.
  185. Overrides the incoming webhook's configured
  186. icon. Accepts a public URL to an image.
  187. `message_defaults.text`;;
  188. The default message content.
  189. `message_defaults.attachment`;;
  190. Default message attachments. Slack message attachments
  191. enable you to create more richly-formatted messages.
  192. Specified as an array as defined in the
  193. https://api.slack.com/docs/attachments[
  194. Slack attachments documentation].
  195. [float]
  196. [[jira-notification-settings]]
  197. ==== Jira Notification Settings
  198. You can configure the following Jira notification settings in
  199. `elasticsearch.yml`. For more information about using notifications
  200. to create issues in Jira, see {xpack-ref}/actions-jira.html#configuring-jira-actions[Configuring Jira].
  201. `xpack.notification.jira` ::
  202. Specifies account information for using notifications to create
  203. issues in Jira. You can specify the following Jira account attributes:
  204. [[jira-account-attributes]]
  205. `secure_url` (<<secure-settings,Secure>>);;
  206. The URL of the Jira Software server. Required.
  207. `secure_user` (<<secure-settings,Secure>>);;
  208. The name of the user to connect to the Jira Software server. Required.
  209. `secure_password` (<<secure-settings,Secure>>);;
  210. The password of the user to connect to the Jira Software server. Required.
  211. `issue_defaults`;;
  212. Default fields values for the issue created in Jira. See
  213. {xpack-ref}/actions-jira.html#jira-action-attributes[Jira Action Attributes] for more information.
  214. Optional.
  215. [float]
  216. [[pagerduty-notification-settings]]
  217. ==== PagerDuty Notification Settings
  218. You can configure the following PagerDuty notification settings in
  219. `elasticsearch.yml`. For more information about sending notifications
  220. via PagerDuty, see {xpack-ref}/actions-pagerduty.html#configuring-pagerduty-actions[Configuring PagerDuty].
  221. [[pagerduty-account-attributes]]
  222. `xpack.notification.pagerduty`::
  223. Specifies account information for sending notifications
  224. via PagerDuty. You can specify the following PagerDuty account attributes:
  225. `name`;;
  226. A name for the PagerDuty account associated with the API key you
  227. are using to access PagerDuty. Required.
  228. `secure_service_api_key` (<<secure-settings,Secure>>);;
  229. The https://developer.pagerduty.com/documentation/rest/authentication[
  230. PagerDuty API key] to use to access PagerDuty. Required.
  231. `event_defaults`;;
  232. Default values for {xpack-ref}/actions-pagerduty.html#pagerduty-event-trigger-incident-attributes[
  233. PagerDuty event attributes]. Optional.
  234. `description`::
  235. A string that contains the default description for PagerDuty events.
  236. If no default is configured, each PagerDuty action must specify a
  237. `description`.
  238. `incident_key`::
  239. A string that contains the default incident key to use when sending
  240. PagerDuty events.
  241. `client`::
  242. A string that specifies the default monitoring client.
  243. `client_url`::
  244. The URL of the default monitoring client.
  245. `event_type`::
  246. The default event type. Valid values: `trigger`,`resolve`, `acknowledge`.
  247. `attach_payload`::
  248. Whether or not to provide the watch payload as context for
  249. the event by default. Valid values: `true`, `false`.