notification-settings.asciidoc 13 KB

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