notification-settings.asciidoc 13 KB

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